Repurpose on board LEDs
7 posts
Is there any way to programmatically take over the control of the on board LEDs? And perhaps restore their original behavior after that? It should be fairly useful for running the pi headlessly.
- Posts: 1
- Joined: Mon Mar 05, 2012 9:45 pm
The power LED is hard wired to the power rail, so no luck with that one, likewise the network indicators are directly wired to the USB/ehternet ic, no luck there.
The ACT LED is, however, driven from GPIO #16, you can write what ever you want to it, but to stop the system using it as well might be tricky (kernel recompile?)
The ACT LED is, however, driven from GPIO #16, you can write what ever you want to it, but to stop the system using it as well might be tricky (kernel recompile?)
>)))'><'(((<
Perhaps there is an option in a file somewhere to disable the system outputting to GPIO16 to indicate ACT
which would leave you free to use GPIO16 and hence the ACT Led for what ever you like.
which would leave you free to use GPIO16 and hence the ACT Led for what ever you like.
- Posts: 172
- Joined: Tue Dec 25, 2012 12:52 pm
According to the LAN9512 data sheet, it is possible to use the three Ethernet LEDs as general-purpose I/O pins. However, I have no idea if the device driver makes this accessible to mere mortals.
It may well be that the 3 LEDs outputs on the LAN chip can be configured as general purpose
outputs but the problem is that the only way to "talk" to the LAN chip is via USB which adds
another layer of complexity.
The LAN9512 actually has 8 GPIOs.
The first 3 (GPIO 0 to 2) are the 3 leds.
Then GPIO 3 to 7 are on pins 35,36,37,42,43
However programing them could be rather difficult as it has to be via USB.
outputs but the problem is that the only way to "talk" to the LAN chip is via USB which adds
another layer of complexity.
The LAN9512 actually has 8 GPIOs.
The first 3 (GPIO 0 to 2) are the 3 leds.
Then GPIO 3 to 7 are on pins 35,36,37,42,43
However programing them could be rather difficult as it has to be via USB.
- Posts: 172
- Joined: Tue Dec 25, 2012 12:52 pm
There is another way, use a RGB LED connected to 3 GPIO pins which will give you 8 possible
colours each indicating a certain condition of your choice.
If you use PWM, then you can have even more combinations.

colours each indicating a certain condition of your choice.
If you use PWM, then you can have even more combinations.

- Posts: 172
- Joined: Tue Dec 25, 2012 12:52 pm
Or if you need more combinations (10) and prefer them in numeric form, use a 7 segment LED display.
This will only use 4 GPIO lines, less if a shift register is used.

Bigger image available here:
http://s1.postimage.org/4qiqn1pnj/7_seg.jpg
This will only use 4 GPIO lines, less if a shift register is used.

Bigger image available here:
http://s1.postimage.org/4qiqn1pnj/7_seg.jpg
- Posts: 172
- Joined: Tue Dec 25, 2012 12:52 pm