Difference between revisions of "Rock/LED"
< Rock
Line 1: | Line 1: | ||
− | The RR has 3 | + | The RR has 3 LEDs, green(172), blue(174), red(175). All can be programmable. |
Below is a small script to flash the green led on RR. | Below is a small script to flash the green led on RR. | ||
Line 19: | Line 19: | ||
done | done | ||
</pre> | </pre> | ||
+ | |||
+ | == LED class and triggers == | ||
+ | |||
+ | on radxa-rock/android-kk branch, 3 LEDs are configured as LED class devices. you can control LEDs via /sys/class/leds/. |
Revision as of 01:03, 17 April 2014
The RR has 3 LEDs, green(172), blue(174), red(175). All can be programmable.
Below is a small script to flash the green led on RR.
#!/bin/sh # enable the gpio 172 -> green led echo 172 > /sys/class/gpio/export # set the direction to output echo "out" > /sys/class/gpio/gpio172/direction while true; do echo 0 > /sys/class/gpio/gpio172/value #led on sleep 1 echo 1 > /sys/class/gpio/gpio172/value #led off sleep 1 done
LED class and triggers
on radxa-rock/android-kk branch, 3 LEDs are configured as LED class devices. you can control LEDs via /sys/class/leds/.