I'm not sure I understand? You want to just flip the state of a boolean value when a button is pressed? If so something like this should be fine:
var l = false; setWatch( function(e) { l=!l; }, B5, {repeat:true, edge:'falling', debounce:100});
Thanks! Will multiplexing ever be supported in Espruino? Just curious.
@BootySnorkeler 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.
I'm not sure I understand? You want to just flip the state of a boolean value when a button is pressed? If so something like this should be fine: