Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/hardware/led

    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

To turn LED on:

# echo default-on > /sys/class/leds/user-led2/trigger

To turn LED off:

# echo none > /sys/class/leds/user-led2/trigger