Illuminated Buttons – Selective Illumination

Home Forums RetroPie Project New to RetroPie? Start Here! Illuminated Buttons – Selective Illumination

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of khayman khayman 2 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #95692
    Profile photo of woobiezarz
    woobiezarz
    Participant

    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

    #95731
    Profile photo of Floob
    Floob
    Moderator

    I’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.php

    RetroPie help guides --> https://goo.gl/Yfy8kj
    Please read this before asking for help --> http://goo.gl/eLErnl

    #95790
    Profile photo of khayman
    khayman
    Participant

    So 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.
    }
Viewing 3 posts - 1 through 3 (of 3 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar