var flashing = false;
function btnPressed() {
if (flashing) {
flashing = false;
// stop flashing the LED here
} else {
flashing = true;
// start flashing the LED here
kb.tap(kb.KEY.M, kb.MODIFY.SHIFT | kb.MODIFY.CTRL, function() {
});
}
}
// trigger btnPressed whenever the button is pressed
setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50});
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.
Hi! As @Sebastian pointed out you should almost be able to do what you want with:
https://www.espruino.com/BLE+Keyboard
So something like this: