Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Assigning functions to LEDs on Orange Pi Zero.

Featured Replies

Hi !

I am running deb stretch server on OPi Zero LTS. To control LEDs I tried to follow this thread https://forum.armbian.com/topic/6306-orange-pi-zero-h2-status-led/

So if I edit the file /sys/class/leds/orangepi:green:pwr/trigger to select "cpu" but I get the following

 

opi@orangepizero:/$ sudo echo "power" > /sys/class/leds/orangepi:green:pwr/trigger
-bash: /sys/class/leds/orangepi:green:pwr/trigger: Permission denied

With root as user, this is what I get

root@orangepizero:/# echo "power" > /sys/class/leds/orangepi:green:pwr/trigger
bash: echo: write error: Invalid argument

however, if I edit the file using nano and delete all contents and then type cpu then it gets saved and green led shows intended status.

Whats the standard procedure to do this??

1 hour ago, Aditya said:

Whats the standard procedure to do this??

When using "sudo", it only affect the left part, here "echo", everything at right of ">" isn't "sudo" applied ...

So, if you wish to use "sudo", syntax would be :

echo "default-on" | sudo tee /sys/class/leds/orangepi:green:pwr/trigger

Note here : "power" is not an available choice, do "cat /sys/class/leds/orangepi:green:pwr/trigger", it will show you all possible choices and the current setting is indicated with brackets. The choice you probably wish is "default-on".

 

  • Author

Thanks a lot. It works fine. :)

It asked for a password when I entered the command like you just told, so how to use this command in rc.local or how to execute it at boot??

Edit:

Simply added the line to /etc/rc.local

Thanks again btw

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.