Difference between revisions of "Rockpi4/hardware/led"
m (Add Rock Pi 4 Hardware header) |
|||
Line 11: | Line 11: | ||
It is '''''green''''' in color and used to indicate power supply. | It is '''''green''''' in color and used to indicate power supply. | ||
+ | |||
+ | ==== ROCK Pi 4C+ ==== | ||
+ | |||
+ | # echo 124 > /sys/class/gpio/export | ||
+ | # echo out > /sys/class/gpio/gpio124/direction | ||
+ | # echo 1 > /sys/class/gpio/gpio124/value # Turn LED off | ||
+ | # echo 0 > /sys/class/gpio/gpio124/value # Turn LED on | ||
=== Status === | === Status === |
Revision as of 11:16, 6 June 2022
ROCK Pi 4 > Hardware > LED
Light-emitting diodes (LED)
There are 2 LEDs on the Rock Pi 4.
Power
It is green in color and used to indicate power supply.
ROCK Pi 4C+
# echo 124 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio124/direction # echo 1 > /sys/class/gpio/gpio124/value # Turn LED off # echo 0 > /sys/class/gpio/gpio124/value # Turn LED on
Status
It is red for Rock Pi 4 v1.3 and blue for Rock Pi 4 v1.4. Shows the status of the device.
For newer kernel, the status LED is configured as heart beat device and usually blinks on/after booting successfully.
Its function can be changed as desired.
$ cat /sys/class/leds/user-led2/trigger none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock mmc0 mmc1 timer oneshot [heartbeat] backlight gpio cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 default-on rfkill0 mmc2 rfkill1 rfkill2
For example, to set it to show emmc read/write status:
# echo mmc1 > /sys/class/leds/user-led2/trigger