Yesss, this seems to work fine:
function onInit () { setDeepSleep(1); setBusyIndicator(LED1); setSleepIndicator(LED3); /* var t; setInterval(function () { t= E.getTemperature(); }, 3000); */ setWatch(function (a) { digitalWrite(LED2, digitalRead(BTN)); }, BTN, {repeat:true, debounce:0, edge:'both'}); }
I don't understand why does the red led stay on until the first BTN press?
@Georg 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.
Yesss, this seems to work fine:
I don't understand why does the red led stay on until the first BTN press?