Skip to main content

IO Blocks

LED Blocks​

Three actions per LED: on, off, toggle.

IO
LED toggleLED1 (green)
IO
LED onLED2 (yellow)
IO
LED offLED3 (red)
LEDColor
LED1Green
LED2Yellow
LED3Red

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.