forked from Agent725/ESP32C3
example on how to flash the LED using Espruino
This commit is contained in:
parent
d54b9c092c
commit
aca023e419
|
|
@ -0,0 +1,18 @@
|
|||
One-liner to flash the LED. It is not on constant LED1 as expected, but instead on output pin D8!
|
||||
|
||||
|
||||
1. Connect to Espruino, using screen.
|
||||
|
||||
screen /dev/ttyACM0
|
||||
|
||||
|
||||
2. Press ENTER to flush serial buffer a bit, then enter one-liner.
|
||||
|
||||
let n=false; setInterval( () => { digitalWrite("D8",n); n=!n; } , 500);
|
||||
|
||||
|
||||
3. Upon pressing ENTER on the Espruino console you should now see the LED flashing.
|
||||
|
||||
|
||||
Exit screen using: CTRL-A q
|
||||
Or kill the serial session using: CTRL-A k.
|
||||
Loading…
Reference in New Issue