Raspberry Pi Hardware Scripts for External LED
#1
Hi, does anyone have any suggestions to make an external LED indicator for a Raspberry Pi 2? I'm using Kodi on it, and the case it came with makes it hard to see the onboard LED. Suggestions on implementing the script?
Reply
#2
LED to do or indicate what?

You can add the GPIO add-on quite easily (depends whether you're running OpenElec, OSMC, Raspbian or something else) and set it up that way, or else if you just want a power indicator just use the pins directly (via a resistor of course) or even replace the onboard LED with a couple of jumper wires out to an LED on the case.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
(2016-03-29, 10:58)DarrenHill Wrote: LED to do or indicate what?

You can add the GPIO add-on quite easily (depends whether you're running OpenElec, OSMC, Raspbian or something else) and set it up that way, or else if you just want a power indicator just use the pins directly (via a resistor of course) or even replace the onboard LED with a couple of jumper wires out to an LED on the case.

The LED was to have a brighter and more visible on and off light when the Pi on or off
Reply
#4
You should try googling "adding a led to raspberry pi" and you will get some great hits that will outline how to connect a led and resister to the GPIO lines and what commands are neeed to turn this LED on or OFF.
Searching "adding a led to raspberry pi running kodi" will get you varied hits but pages on how to set up LIRC may provide useful insight..

But do take note that the required commands to controll the LED may not work on all Linux Operating Systems since certain GPIO libraries required to access the GPIO lines may not be included by default.
And as you mention nothing about what OS you are runing on your RPi, people can't be specific about what may be missing (i don't know as i haven't played with GPIO lines).

Now take note that Kodi is an application, not an OS.
OpenElec is a cut down Linux OS which includes the Kodi application in the single package you download.
Also be aware that the RPi-3 has different LED behaviour compared to RPi-2 and earlier Tongue

Have fun learning about RPi programing Tongue
I'm a XBMC novice :)
Reply
#5
OpenElec has RPi.GPIO in the unofficial repo, and you can use that as well on LibreElec (it doesn't have an unofficial repo, as they're working to integrate it into the main one at the moment). OSMC I think also has the equivalent GPIO add-on available in its repo.

As @skylarking says, for a simple LED that comes on when the power is applied (whether the Pi is booted up or not) you just need to wire an LED and resistor up to one of the 3v3 power pins and a ground pin, as detailed in his first link (or an alternative one is here from the PiHut.. One that comes on only when the Pi is actually on and booted up is a little more complex, but still fairly trivial. See the code in the PiHut link, combined with an Autoexec.py (wiki) script or alternatively an autostart.sh script if you're on OpenElec/LibreElec.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#6
(2016-03-29, 05:57)PhantomStream Wrote: Hi, does anyone have any suggestions to make an external LED indicator for a Raspberry Pi 2? I'm using Kodi on it, and the case it came with makes it hard to see the onboard LED. Suggestions on implementing the script?

I have a Raspberry Pi 3 and run OSMC (Kodi) on it exclusively. I followed this
at step 3 and it works perfectly for me!
https://howchoo.com/g/ytzjyzy4m2e/build-...erial-port
Reply

Logout Mark Read Team Forum Stats Members Help
Raspberry Pi Hardware Scripts for External LED0