-
• #2
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:
setWatch(function() { Bluetooth.println("BTN"); }, BTN, {repeat: true, edge: 'rising', debounce: 50});
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
Hi, im kinda struggling again using react-native-ble-plx
I try to recognize when the button was pressed, i tried different things, my last approach was to add a characteristic and monitor this in my react native application, but the characteristic just wont show up, any ideas?