Page 1 of 1

how to control Neo Plus2 on board LED

Posted: Wed Aug 16, 2017 4:24 pm
by kentchan4
Hi,

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!

Re: how to control Neo Plus2 on board LED

Posted: Tue Sep 12, 2017 8:09 pm
by guidol
Hi,
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
nanopi:blue:status
nanopi:green:pwr

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