Puck.write('LED1.set();\n');
Puck.write('\x10LED1.reset();\n');
// both work
Puck.write('LED1.set();\n');Puck.eval("BTN.read()",function(x) { console.log(x); })
// fails - as expected
Puck.write('\x10LED1.set();\n');Puck.eval("BTN.read()",function(x) { console.log(x); })
// works 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.
Do you have your Web Bluetooth page hosted online somewhere that I could take a look at?
I just went to https://www.espruino.com/try.php?page=Puck.js+Web+Bluetooth&n=0, clicked some buttons to get it connected, opened devtools, and then started typing.