Add extra GPIOs to be controlled as led0

Hi,

Can you please enable us to control additional leds connected to available GPIOs on the header?
I want to install my rpi in a big case and to have external activity leds, triggered by for example mmc0, would be great.

example: echo mmc0 >/sys/class/leds/led1/trigger

led1 could be GPIO17

http://elinux.org/Assign_GPIO_as_ACT-led
https://www.raspberrypi.org/forums/viewtopic.php?f=31&t=12530

1 Like

I believe that the LED triggers are already included for Raspberry Pi.

If you want to use GPIO based LEDs, you probably need to modprobe gpio-led or some similar module. Then you will see them under /sys/class/leds and be able to set them up as triggers.

Append this line to cmdline.txt
(nn = gpio pin)

......
dtoverlay=pi3-act-led,activelow=on,gpio=nn

Remove ‘activelow=on,’ to reverse LED on/off.