Disable leds


Decker
 Share

0

Recommended Posts

Hi,

 

3 flashing led diodes of my Banana Pi make good party atmosphere when I want to sleep.

 

what are ways to disable led diodes on Banana Pi? Is there a way to disable them without recompiling kernel? Can it be done by editing script file in /boot?

 

What exactly do I need to change to switch them off?

 

Thank you very much!

 

 

Link to post
Share on other sites

Donate and support the project!

Hi,

 

I have the following bash script in /usr/local/bin/

#!/bin/bash
echo none > /sys/class/leds/green\:ph24\:led1/trigger
#GB: New for 4.2 kernel+
echo none > /sys/class/leds/bananapi\:green\:usr/trigger

That will turn off the green LED.

 

And then to turn off the blue LED with:

#!/bin/bash
/usr/local/bin/bpi_ledset eth0 b

You need to have bpi_ledset from https://github.com/n1tehawk/bpi_ledset

 

Then to have these run at boot I've got the following in /etc/rc.local

#!/bin/bash
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/blueoff.sh &
/usr/local/bin/greenoff.sh &
exit 0
Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

0