You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • 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 :)


Avatar for Gordon @Gordon started