Power & Source of Big Ideas

how to control Neo Plus2 on board LED

Moderators: chensy, FATechsupport


I am interest to modify the use of BLUE on board LED, from it flash regularly, into an activity LED of SD card (or anything else)

Refer to Dietpi forum, people can successfully add below code into Nanopi Neo (I have one... and it is interesting)
and now, I have an Neo Plus 2 with Ubuntu, found the control may different, like to know if anyone have experience or knowledge to add any script to modify the usage?
I am using Ubuntu 20170630img.

below the code to put in rc.local

#### switch on blue LED for sd-card activity
echo 1 >/sys/class/leds/blue_led/brightness
echo mmc0 >/sys/class/leds/blue_led/trigger

#### switch on blue LED for heartbeat
## echo 1 >/sys/class/leds/blue_led/brightness
## echo heartbeat >/sys/class/leds/blue_led/trigger

#### switch off blue LED
## echo 0 >/sys/class/leds/blue_led/brightness
## echo none >/sys/class/leds/blue_led/trigger

exit 0

thank you!
the name of the blue LED "led_blue" could depend on the Operating System you do use.

Today I installed my new NanoPi Duo and when I list the names of the LEDs I did get this:

root@NanoPiDuo:/# ls /sys/class/leds

So with the ls-command you have to check the real name of your blue LED.

The command for the name of my blue LED and MMC-blinking would be:
#### switch on blue LED for sd-card activity
echo 1 >/sys/class/leds/nanopi:blue:status/brightness
echo "mmc0" >/sys/class/leds/nanopi:blue:status/trigger

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 42 on 15 Jul 2016, 01:04

Users browsing this forum: thomaspfeiffer and 1 guest