LED#
Introduction#
The VEX AIM Coding Robot has six LEDs (Light-Emitting Diodes) around the body of the robot. The LEDs can be set to different colors to give feedback, show a robot status, or make the robot easier to track during a project. Each LED can be set individually, or all LEDs can be set at the same time.
Below is a list of all blocks:
Action — Set LED color.
set LED color — Sets the color of one LED or all LEDs.
Actions#
set LED color#
The set LED color stack block sets the color of one LED or all LEDs on the robot.
set [lightall v] LED color to [blue v]
Parameter |
Description |
|---|---|
LEDs |
The LED or LEDs to set. Choose LED 1, LED 2, LED 3, LED 4, LED 5, LED 6, or All LEDs. See the LED options below. |
color |
The color to set the selected LED or LEDs to:
|
|
|
|
|---|---|---|
|
|
|
|
Example
when started
[Turn all LEDs green while the screen is pressed.]
forever
if <screen pressed?> then
set [lightall v] LED color to [green v]
else
set [lightall v] LED color to [off v]
end
end






