4

With something like

dtoverlay=act-led,gpio=26

in boot/config.txt I can enable an external activity LED, which is useful if the Pi is in a case and the on-board LED cannot be seen. Unfortunatelly, this disables the internal LED, so when the external LED is disconnected (or broken), nothing can be seen at all, even if the case is open.

Is there a way to enable both, basically duplicating the LED status to the GPIO pin, instead of replacing it?

PMF
  • 906
  • 7
  • 14

2 Answers2

2

An alternative answer to duplicating a led is to create another in /boot/config.txt
using dtoverlay=gpio-led[,gpio|label|trigger|active_low]=<val>

eg.
dtoverlay=gpio-led,gpio=25,label=my_status_led,trigger=mmc0
(this assumes that your existing act_led is using mmc0 as the trigger.)
Once you reboot, it will magically appear in /sys/class/leds/ as my_status_led
The trigger can be any value already used by act_led.
See /boot/overlays/README for a list of settings for dtoverlay=gpio-led (scroll down to Name: gpio-led for a list of parameters.)
Personally I would use gpio26 since it is near gpio21 which I use for my illuminated shutdown button.

Jassman23
  • 36
  • 3
0
#act led now on gpio 25
dtparam=act_led_gpio=25

USE THIS FOR ALL RASPBERRY PI MODEL[PI1 to PI4]

or

#act led now on gpio 
dtparam=act_led_gpio=25
MatsK
  • 2,882
  • 3
  • 17
  • 22