Ahh - maybe you could try what I suggested at the start first? Just a function called 'X'?
Bluetooth.on('data', is called when data is received, but only when you move the REPL out the way with something like E.setConsole(null) as I'd said above - and you don't seem to be doing that here?
Try adding E.setConsole(null) to NRF.on('connect', function(addr) { but just be aware that you won't then be able to connect to flash the Bangle - you'll have to hold the button to reload the default clock (which hopefully isn't your app!).
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.
Ahh - maybe you could try what I suggested at the start first? Just a function called 'X'?
Bluetooth.on('data',
is called when data is received, but only when you move the REPL out the way with something likeE.setConsole(null)
as I'd said above - and you don't seem to be doing that here?Try adding
E.setConsole(null)
toNRF.on('connect', function(addr) {
but just be aware that you won't then be able to connect to flash the Bangle - you'll have to hold the button to reload the default clock (which hopefully isn't your app!).