IO Blocks
LED Blocks
Three actions per LED: on, off, toggle.
IO
LED toggleLED1 (green)
IO
LED onLED2 (yellow)
IO
LED offLED3 (red)
| LED | Color |
|---|---|
| LED1 | Green |
| LED2 | Yellow |
| LED3 | Red |
Example — 1 Hz heartbeat
SETUP
Variables
declare variablenamecounterinitial0
LOOP ~1 kHz
Variables
add (+)counter+=1
Control
ifcounter>=500
IO
LED toggleLED1 (green)
Variables
set to numbercounter=0
At 1 kHz, counter reaches 500 every 500 ms — so LED1 toggle fires twice per second, giving a 1 Hz blink.