The following code seems valid but the led is not blinking. The console output is correct. It is as if digitalWrite is not working.
When I run the code without save() and onInit() functions, inside simple setInterval the led is blinking. Any iade?
var toggle=1;
function start(){
setInterval(function() {
toggle=!toggle;
digitalWrite(D5, toggle);
console.log(toggle);
}, 1000);
}
function onInit() {
start();
}
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.
The following code seems valid but the led is not blinking. The console output is correct. It is as if digitalWrite is not working.
When I run the code without save() and onInit() functions, inside simple setInterval the led is blinking. Any iade?