Nasthran
Posts: 21
Joined: Fri Jul 12, 2013 4:35 pm

Possible to grab ACT/PWR Led over GPIO?

Mon Mar 14, 2016 11:14 am

Hey Community,

i wonder if its possible to grab the same behavior from the ACT and PWR led over specific GPIO pin(s) with- or without assisting python script...

Background is; i want to have external Power and Act Lights for my "Raspberry Pi 2 Model B"
so i have two leds (green and red)+ alot of resistors over here, the question is, how to get theese both external with exact same behavior (if ACT is flashing, red led should also flash, if the pi shuts down and PWR is flashing 10times, the external should do EXACT the same..)


i hope someone is able to help me quick :(

Info; im Using Raspbian Jessie (minimal image) - if that is usefull to know..

User avatar
rpdom
Posts: 16398
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Possible to grab ACT/PWR Led over GPIO?

Mon Mar 14, 2016 11:45 am

The Red PWR LED shouldn't flash at all, unless there is something wrong with the power.

The Green ACT LED can be redirected to a GPIO easily by putting one line in /boot/config.txt

Code: Select all

# Use external LED as ACT LED :-)
dtparam=act_led_gpio=nn
where "nn" is the BCM number of the GPIO pin you wish to use.

Just one thing, the ten flashes of the ACT LED to signify the Pi is ready for switch off can't be redirected in this way. Just the SD card activity.
Last edited by rpdom on Mon Mar 14, 2016 11:46 am, edited 1 time in total.

User avatar
joan
Posts: 14765
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Possible to grab ACT/PWR Led over GPIO?

Mon Mar 14, 2016 11:45 am

For a Pi2B I think the answer is yes for activity, not sure about power.

Look in /boot/overlays/README for details.

In both cases you could mirror the GPIO via software (i.e. read GPIO 47 and write GPIO X, read GPIO 35 and write GPIO Y).

Nasthran
Posts: 21
Joined: Fri Jul 12, 2013 4:35 pm

Re: Possible to grab ACT/PWR Led over GPIO?

Mon Mar 14, 2016 2:25 pm

rpdom wrote:

Code: Select all

# Use external LED as ACT LED :-)
dtparam=act_led_gpio=nn
where "nn" is the BCM number of the GPIO pin you wish to use.
this works perfectly! TYVM :D :D :D

ankushnag14
Posts: 10
Joined: Mon Apr 30, 2018 9:13 am

Re: Possible to grab ACT/PWR Led over GPIO?

Fri May 04, 2018 8:44 am

Nasthran wrote:
Mon Mar 14, 2016 2:25 pm
rpdom wrote:

Code: Select all

# Use external LED as ACT LED :-)
dtparam=act_led_gpio=nn
where "nn" is the BCM number of the GPIO pin you wish to use.
this works perfectly! TYVM :D :D :D
I tried the same thing by directing it to gpio 25 like below and activity is not happenning at all ( Green LED is not coming up)
dtparam=act_led_gpio=25
when I removed the line and did a reboot. Green LED comes like before. Please help me.

User avatar
rpdom
Posts: 16398
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Possible to grab ACT/PWR Led over GPIO?

Fri May 04, 2018 3:53 pm

ankushnag14 wrote:
Fri May 04, 2018 8:44 am
I tried the same thing by directing it to gpio 25 like below and activity is not happenning at all ( Green LED is not coming up)
dtparam=act_led_gpio=25
Let me guess, you're using a Pi 3B? That's the problem with following a two year old post which was valid for the Pi 2B.

Try

Code: Select all

dtoverlay=pi3-act-led,gpio=25

ankushnag14
Posts: 10
Joined: Mon Apr 30, 2018 9:13 am

Re: Possible to grab ACT/PWR Led over GPIO?

Mon May 07, 2018 8:01 am

rpdom wrote:
Fri May 04, 2018 3:53 pm
ankushnag14 wrote:
Fri May 04, 2018 8:44 am
I tried the same thing by directing it to gpio 25 like below and activity is not happenning at all ( Green LED is not coming up)
dtparam=act_led_gpio=25
Let me guess, you're using a Pi 3B? That's the problem with following a two year old post which was valid for the Pi 2B.

Try

Code: Select all

dtoverlay=pi3-act-led,gpio=25
This worked. Thank you so much. Do you know any LED strip set with different coloured LEDs available online? so that I can remove all wire connections which is used for connecting to a bread board.

Return to “Interfacing (DSI, CSI, I2C, etc.)”