To list the available options open a terminal and enter cat /sys/class/leds/green:ph24:led1/trigger. The default value is heartbeat. If you want to permanently switch it off the trigger needs to be set to none.
user@lemaker ~ $ cat /sys/class/leds/green:ph24:led1/trigger none battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer [heartbeat] backlight gpio cpu0 cpu1 default-on user@lemaker ~ $ sudo su root@lemaker:~# echo none > /sys/class/leds/green:ph24:led1/triggerThe LED may be manually turned on and off using the brightness file. The minimum is 0 (i.e. off), and the maximum is 255. To switch it on:
root@lemaker:~# echo 1 > /sys/class/leds/green:ph24:led1/brightness
Let it blink
#!/bin/bash echo none > /sys/class/leds/green:ph24:led1/trigger while true; do echo 1 > /sys/class/leds/green:ph24:led1/brightness sleep 1 echo 0 > /sys/class/leds/green:ph24:led1/brightness sleep 1 doneMake sure to run the script as root - e.g. sudo sh led.sh.
Great tip, thanks.
ReplyDeleteBTW - you can get a root shell in a slightly more straightforward way with "sudo -i". You can also redirect as root with tee(1), something like:
echo 1 | sudo tee /sys/class/leds/green:ph24:led1/brightness
ReplyDeleteThank you, very informative!
Richard Brown dataroom software