Switch to root user
Only the root user has the authority to control and modify the node status of the LEDs
1 | khadas@Khadas:~$ su |
Confirm led node
1 | root@Khadas:/home/khadas# cd /sys/class/leds/ |
How To Use
Here takes sys_led
as an example:
1 | root@Khadas:/sys/class/leds# cd sys_led |
View all configurable parameters.
1 | root@Khadas:/sys/class/leds/sys_led# cat trigger |
Turn off
Enter none
parameter to turn off the LED
1 | root@Khadas:/sys/class/leds/sys_led# echo none > trigger |
Turn on
Enter default-on
parameter to turn off the LED
1 | root@Khadas:/sys/class/leds/sys_led# echo default-on >trigger |
Set heartbeat
can make the LED flash
1 | root@Khadas:/sys/class/leds/sys_led# echo heartbeat > trigger |
You can also try other parameters.