As @Wilberforce says, you'd have to reconnect to get control back.
And if you're wondering why it's not working when you enter characters yourself, it's because they're being sent one by one - so Bluetooth.on('data',... gets called with a single character.
To make it work properly in that case you'd have to store the whole string, a bit like:
var data = "";
Bluetooth.on('data', function(d) {
data += d;
// and then handle what's in 'data'
});
The reason it works for the Adafruit app is that the app is sending the characters all in one chunk, so they're being received in one chunk.
I guess you might have some luck if you copied and then pasted the command into the Web IDE, but it's not guaranteed :)
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.
As @Wilberforce says, you'd have to reconnect to get control back.
And if you're wondering why it's not working when you enter characters yourself, it's because they're being sent one by one - so
Bluetooth.on('data',...
gets called with a single character.To make it work properly in that case you'd have to store the whole string, a bit like:
The reason it works for the Adafruit app is that the app is sending the characters all in one chunk, so they're being received in one chunk.
I guess you might have some luck if you copied and then pasted the command into the Web IDE, but it's not guaranteed :)