Who is status defined? ...as global variable? - I'm not aware of STATUS begin reserved or used by definition. Running 1v85 and - fortunately ;-) on a PICO and not a 411 - it just does the right thing... even without declaring STATUS (B2 = LED = LED1 - the red one - on PICO).
STATUS=B2; var myVar = 32; digitalWrite(STATUS,1);
setTimeout("digitalWrite(STATUS,0)",1000);
console.log(STATUS);
console.log(myVar);
The LED behavior - 1 sec on '@' upload - and console output are as expected:
The code STATUS=C0; // in my case STATUS=B2; is actually not redefining a pin... it is just implicitly creating a variable and let it point to the pin mentioned on the right side...
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.
Who is status defined? ...as global variable? - I'm not aware of STATUS begin reserved or used by definition. Running 1v85 and - fortunately ;-) on a PICO and not a 411 - it just does the right thing... even without declaring STATUS (B2 = LED = LED1 - the red one - on PICO).
The LED behavior - 1 sec on '@' upload - and console output are as expected:
And so is it with some more code which does what you intend to do:
Console output:
Messing up... a 411 thing?
The code
STATUS=C0; // in my case STATUS=B2;
is actually not redefining a pin... it is just implicitly creating a variable and let it point to the pin mentioned on the right side...