LED#
Introduction#
The VEX AIM Coding Robot features codeable LEDs (Light-Emitting Diodes) that can change color based on conditions in a project. These LEDs can be set individually or all at once to provide visual feedback or indicate robot status.
set LED color#
The set LED color block sets the color of one or all of the robot’s LEDs.
set LED color to green#
set [lightall v] LED color to [blue v]
Parameters |
Description |
---|---|
LEDs |
One of the LEDs to set (shown below). |
color |
Sets the LED color:
|
|
|
|
---|---|---|
|
|
|
|
Example
when started, if the screen is pressed, set all LEDs color to green#
when started :: hat events
[Turn 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