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.

sign of life (nanopi neo2): flash green LED each x seconds?

Featured Replies

Sometimes it's unclear if my Nanopi NEO2 is still running, or fully locked up / FUBAR. Ping and SSH give no result. As there is no HDMI, I have no way to check if it's still there.

 

So I was thinking: can I let the green LED flash each x seconds as a sign of life?

 

Quote from Igor: "Both are accessible via sysfs, green is configurable while blue is not lit and reacting to anything. ".  

 

So a crontab script that writes something to /sys/ <LED> ... ? 

 

Feedback appreciated.

 

 

 

 

  • Author
4 hours ago, chrisf said:

If your LED's are in the device tree,

echo "heartbeat" > /sys/class/leds/xxxx/trigger 

 

OK, thanks, I will try ... as soon as I get my Neo2 back to life ... ;-)

  • Author

Wow ... it works! Thank you

 

The blue LED:

root@nanopineo2:~# echo 1 > /sys/class/leds/nanopi:blue:status/brightness
root@nanopineo2:~# echo 0 > /sys/class/leds/nanopi:blue:status/brightness


 

The green LED

root@nanopineo2:~# echo 0 > /sys/class/leds/nanopi:green:pwr/brightness
root@nanopineo2:~# echo 1 > /sys/class/leds/nanopi:green:pwr/brightness

 


 

 

  • Author

root's crontab:

 

* * * * *    /root/green-on-and-off.sh

 

with that script being:

 

for i in `seq 10`
do
    echo 0 > /sys/class/leds/nanopi:green:pwr/brightness
    sleep 0.2
    echo 1 > /sys/class/leds/nanopi:green:pwr/brightness
    sleep 0.2
done

Result: green LED is always on, but flashes off/on 10 times each minute. That's a good sign of life for me.
 

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.