1 2 3 4 5 6 7
var on = false; var change = function() { on = !on; LED1.write(on); }; setWatch(change, BTN1, {repeat:true, edge:"rising"});