Is there a way to rename a pin? Let's say that a LED is mapped on C0, and is representing some kind of status of the device. I would like to do a digitalWrite(STATUS,x).
I tried doing this:
digitalWrite(STATUS,1);```
This seems to work perfectly. But then I add a variable:
STATUS=C0;
var myVar=32;
digitalWrite(STATUS,1);``
With this last example, when uploading the script to the Espruino (in my case this is right now the Nucleo-411 because each of my Espruinos are already in use) , it appears thatmyVarequalsC0` !
I suspect the STATUS=C0 to be misunderstood by myself, right?
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.
Hi!
Is there a way to rename a pin? Let's say that a LED is mapped on
C0
, and is representing some kind of status of the device. I would like to do adigitalWrite(STATUS,x)
.I tried doing this:
STATUS=C0;
var myVar=32;
digitalWrite(STATUS,1);``
With this last example, when uploading the script to the Espruino (in my case this is right now the Nucleo-411 because each of my Espruinos are already in use) , it appears that
myVarequals
C0` !I suspect the
STATUS=C0
to be misunderstood by myself, right?