Sterowanie LED

Moderator: bbiernat

Post Reply
User avatar
pancio
Administrator
Posts: 63
Joined: 18 September 2013, 23:02 - Wed
Location: SILESIA

Sterowanie LED

Post by pancio »

Dostępne LEDy:

Code: Select all

root@ct8:~# ls /sys/class/leds
blue:ph21:led1	green:ph07:led4  orange:ph20:led2  white:ph11:led3
root@ct8:~# 
Sprawdzamy dostępne trigery:

Code: Select all

root@ct8:~# cd /sys/class/leds/blue\:ph21\:led1
root@ct8:/sys/class/leds/blue:ph21:led1# 
cat trigger 
none battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 mmc1 timer disk-activity [heartbeat] backlight cpu0 cpu1 default-on rfkill0 rfkill1 rfkill2 
Przypisujemy Blue-LED dla aktywności (przykładowo) cpu0:

Code: Select all

echo cpu0 > /sys/class/leds/blue\:ph21\:led1 
I już możemy obserwować obciążenie procesora cpu0 za pomocą intensywności świecenia niebieskiej diody...

Post Reply