How to control onboard leds of Orange Pi Zero

The Orange Pi Zero has two onboard LED, a red one and a green one. You can control them using sysfs interface. In general you can use a sysfs interface of the gpio driver but since these two leds are reserved by the LED driver you can only use this way

echo 1 > /sys/class/leds/red_led/brightness
echo 0 > /sys/class/leds/red_led/brightness
echo 1 > /sys/class/leds/green_led/brightness
echo 0 > /sys/class/leds/green_led/brightness

One thought on “How to control onboard leds of Orange Pi Zero

  • January 6, 2018 at 6:16 pm
    Permalink

    echo 1 > /sys/class/leds/orangepi:red:status/brightness
    echo 0 > /sys/class/leds/orangepi:red:status/brightness
    echo 0 > /sys/class/leds/orangepi:green:pwr/brightness
    echo 1 > /sys/class/leds/orangepi:green:pwr/brightness

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *