Homepage › Forums › RetroPie Project › New to RetroPie? Start Here! › Illuminated Buttons – Selective Illumination
- This topic has 2 replies, 3 voices, and was last updated 9 years, 5 months ago by khayman.
-
AuthorPosts
-
04/20/2015 at 04:26 #95692woobiezarzParticipant
Random post for my very first post here (thanks for having me).
I’m (attempting) to build a stand up arcade cabinet using an RPi 2 and Emulation Station.
For my controls, I’m hoping to go with illuminated buttons via an Ipac board and using HDMI to output video and audio to a monitor/speaker setup.
Does anyone know if Emulation Station supports illuminated buttons for certain consoles? ie, if I was to boot up Atari 2600, could I illuminate just the 1 button on my controls? Or if NES was selected, illuminate 2 buttons, etc.
Hopefully I havent done against any site rules, this is my first post here. :)
Appreciate any feedback people can give.
Scotty
04/20/2015 at 20:19 #95731FloobMemberI’m really not too sure to be honest, if its Emulation Station specific you may want to ask here as well:
http://emulationstation.org/forum/index.php04/21/2015 at 18:56 #95790khaymanParticipantSo this is possible in theory (I haven’t tried this so YMMV). I’ve been sort of noodling on it since I saw this yesterday (couldn’t sleep last night and was in my workshop playing with stuff) and I think I have a way you might be able to make it happen.
LED equipped buttons have 4 connectors: a signal and ground for the switch + a pos and neg for the LED. EmulationStation allows you to specify your launch commands and in doing so you could inject appropriate code (google sending commands using python from raspberry pi GPIO boards).
How I’d do it (again, in the process of building this it would likely change as I figured out what didn’t work). I would set up base configurations and plan those out. Let’s say I had (for argument’s sake) six buttons in a classic 3 columns, two rows layout. Number then 1, 2, 3 across the top row… 4, 5, 6 on the next line. Then figure out the configurations:
NES: 1 & 2
Atari: 1
SNES: 1 & 2 & 3 & 4 & 5 & 6
etc…I’m not sure if the GPIO pins on the raspberry pi could drive enough power without causing a drain elsewhere to run all of them (again, they might… might not). So I might consider hooking up my Arduino to my pi, let my pi send the command and write scripts into the Arduino to receive the commands to turn on/off the LEDs. LEDs are connected into the Arduino. It would take some tinkering and you’d want to build the appropriate circuits on a breadboard. Your Arduino script might be something along the lines (again, not testing this or really checking it as I’m at work right now… just sort of one-offing it):
void setup() { Serial.begin(9600); // or whatever it needs to be between the two } void loop() { if (Serial.available() > 0) { int command = Serial.read(); // get our command if (command == 1) { // Atari lightupAtari(); } if (command == 2) { //or whatever } } } void lightupAtari() { digitalWrite(13, HIGH); //assuming pin 13 is hooked up to drive button 1 } void lightupNes() { //write out your commands for lighting the appropriate buttons. //it might be good to chain several buttons to one pin if you can //and think about them in groups. } void lightsForES() { digitalWrite(13, LOW); // and all of your other pins, make sure to turn them off. }
-
AuthorPosts
- The forum ‘New to RetroPie? Start Here!’ is closed to new topics and replies.