Chapter 10. Other Devices
10.1. LED
The Armadillo-400 Series LEDs are supported as LED class devices. The LEDs can be controlled with the files under
Table 10.1. LEDs and LED Class Directories
LED Class Directory
Description
/sys/class/leds/red/
LED3 (red)
/sys/class/leds/green/
LED4 (green)
/sys/class/leds/yellow/
LED5 (yellow)
10.1.1. Activating and Deactivating LEDs
LEDs can be turned on and off by writing an appropriate value to the brightness file under the LED class directory. A
value between 0 and 255 can be written to the brightness file.
Writing any value apart from 0 to the brightness file turns the LED on. As the Armadillo-400 Series LEDs do not have
brightness control functionality, the value has no effective meaning.
[armadillo ~]# echo 1 > /sys/class/leds/yellow/brightness
Figure 10.1. Turning LED5 On
Writing 0 to the brightness file turns the LED off.
[armadillo ~]# echo 0 > /sys/class/leds/yellow/brightness
Figure 10.2. Turning LED5 Off
The current state of the LED can be obtained by reading the brightness file. 0 represents the off state, and any other value
represents an on state.
[armadillo ~]# cat /sys/class/leds/yellow/brightness
0
Figure 10.3. Displaying LED5 State
10.1.2. Using Triggers
A trigger to turn the LED on and off can be set by writing an appropriate value to the trigger file under the LED class
Armadillo-440 LCD Model Development Set Startup Guide
Other Devices
59