That looks good to me, but to make it show up you have to be sure that you're disconnected from bluetooth when you run NRF.setServices or at some point after (since the BLE stack needs to restart).
... but if you just wanted to detect a button press, maybe just do:
That will send just the text BTN plus a newline over the bluetooth connection (no extra control characters) and the existing code you posted up in the other thread should work fine
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
That looks good to me, but to make it show up you have to be sure that you're disconnected from bluetooth when you run
NRF.setServices
or at some point after (since the BLE stack needs to restart).... but if you just wanted to detect a button press, maybe just do:
That will send just the text
BTN
plus a newline over the bluetooth connection (no extra control characters) and the existing code you posted up in the other thread should work fine