Yes, many thanks, well done:
This program displays a red square when Bluetooth connects, and a blue square on disconnection. This works as expected, good.
NRF.on('connect', function(addr) { // Red square. g.setColor(255,0,0); g.fillRect(0,0,20,20); }); NRF.on('disconnect', function(reason) { // Blue square. g.setColor(0,0,255); g.fillRect(20,0,40,20); });
@rchateauneu started
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.
Yes, many thanks, well done:
This program displays a red square when Bluetooth connects, and a blue square on disconnection. This works as expected, good.