1

I am creating a casing for my retro pi unit.

How can I program some LEDs using the IO ports to light up when the unit is switched on specifically on the retro pie distro?

Is it possible to create a simple script which will execute and keep running whilst the device has power?

I can see many tutorials on creating a program to light an LED in raspian, but how can I get this to run automatically on boot up in retropie?

  • I'm disappointed you haven't managed to find any information to help you. It is widely available. I'd start by looking through raspberrypi.org/magpi/issues – joan Jun 12 '16 at 13:42
  • I am aware of the numerous tutorials online regarding the pi and simple led i/o programs. I expect I could create a program and run it in raspian. This question is specifically looking at the retro pie distro. How could I get a program running as part of booting of this distro...running in the background...not running manually by double clicking an executable. – sw123456 Jun 12 '16 at 14:13
  • 1
    My mistake. I have no knowledge of Retropie. – joan Jun 12 '16 at 14:51
1

Having a script running continuously just to keep an LED on is going to use a lot of the Pi's ressources. Here are some alternatives:

  1. Since you are talking about building a case and there is already a power LED on the Pi, include a light-conductive rod (clear acrylic might do) in your case to carry the light from the existing LED to the outside of your case.
    1. If you erally want to have your own LED (it does look better than a light conducting rod), just have your script run once at bootup (using the startup deamon of retroPi or cron) just to turn your LED on and make sure your script terminates and closes, then have a different script running once whenever a shutdown is in process using the shutdown system of retropi.
  • Thank you for your advice. Sounds great.Can't wait to start the project. I'm converting an old 'dead' Amiga 500 by dying it 'black' and replacing the motherboard with the retro pie machine and using an old a1200 keyboard with keyrah so to have an integrated usb keyboard! :) – sw123456 Jun 12 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.