Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

PiGRRL Button installation need advise



  • My build RPI 3
    Waveshare 3.2 lcd touch b
    Power 2A

    Hey Retropie Community ,

    I am building a PiGRRL, nothing special and everybody should do that with the amount of guides here right ?!
    As every Pi project is kinda different and unique there were no solution for my specific problem.

    so here is my PROBLEM : i have bought a adafruit gamepad PCB and soldered all my litte buttons(tacticle switches) but i dont know how to connect them to the raspberry pi.

    http://imgur.com/a/YLrsG
    http://imgur.com/a/RI60n
    (image of waveshare )

    to go into further details : I have bought a Waveshare 3.2inch lcd (b) with touchscreen and thought great I can plug it into my raspberry pi and it will have ports that will enable me to plug in some more cables on to it like the PiTFT. But thought wrong most of the gpio pins were used by the lcd and no other ports were free to plug my buttons to (yeah 26 pins were used by the lcd and there are 40 pins on the RPI3 but i know for sure they are not all usable ) .

    http://imgur.com/a/M8EXO
    (picture of what i mean by covering )

    I sent a email to the manufacturer Waveshare ,to know if the covered ports(covered because of the display taking the place) of the RPI3 were not all busy(meaning they were free to use for other applications), they told me I could solder cables on the other side of the Raspberry PI board .The ports that are marked as NC(normaly closed) can be used as normal GPIO ports .

    http://imgur.com/a/kJ12f
    (screenshot of the email in here)

    So far so good, but as I have burned a Raspberry before I am very cautious .I would ask you guys if I could plug my buttons right into a pin ,or if I should use a breadboard to avoid a short-circuit-current . Maybe connecting every button with a resistor would be a solution. The circuit for a pull down switch that I have in mind would look like this.

    http://imgur.com/a/jkDAX
    (picture of the gamepad pcb)

    http://imgur.com/a/JFXkA
    (picture of a pull down button circuit)

    I am a mechanical engineering student ,I can build and understand circuits to the degree of OP amps and MOSFETS but i dont know how a raspberry acts as a circuit component I just see it as a black box and no ground on the other end :D .



  • @tonaytan It sounds like you are on the right track. You have two boards that both want to attach to the GPIO headers. Obviously, only one can occupy that space. I was looking at the Adafruit step-by-step and it looks like they are using a ribbon cable. One end connects to the GPIO pins, the other end goes to the display, but not all wires make the journey. It looks like they cut the unused wires at the display end (so they are still connected to GPIO) and solder these to the inputs. One will be a ground, the rest must be unused pins. Does this sound about right?

    Then, in software, in addition to setting up the display, you would load the Adafruit Retrogame driver/script to define which pins are for what buttons. That assumes that the display doesn't need them all, and that enough remain to make the controls usable.

    I know I am not being very specific, but I have never built one of these. I am sure someone here has and possibly with your hardware config (or at least something similar).



  • I just want to know if I can solder my Buttons with a GPIO PIN will the CPU burn off?



  • @tonaytan heh, you can if you are mindful about which GPIO you use. Some pins supply power (3.3v, 5v), others are ground. Every button should get a common ground on one side of the switch. You could use a single pin for this and daisy chain it to every switch so they all share the same ground in parallel. The other side of the switches will each require their own pin, and you obviously don't want to wire them to the power pins. Which ground and which open pins you use will depend on what is available after you find out what your display is using. There are a lot of resources online that show the pins folks are using for things like buttons. I would be surprised if there isn't already a pigrrl tutorial out there that suggests which ones to use.



  • Maybe your button PCB already does the parallel ground for you. . .



  • as a quick update i asked ADAFRUIT and today I am going to solder the pins on the pcb and trying to get some signals 0_1502430887378_adafr.png



  • @tonaytan sounds like they were designed to work together. That’s good!



  • could get it to work :)



  • @tonaytan said in PiGRRL Button installation need advise:

    could get it to work :)

    You did? That's great! Will you post some photos here? I am considering this project or maybe the mintyPi. I might like to see how you did it.



  • How did you manage to work with the lack of gpio? soldering the pigrrl pcb to the raspberry? i can't find any examples of waveshare and pigrrl pcb. I would really appreciate if you could attach a picture or say how you solved it. Thanks!



  • so i soldered everything then connected the display got it to work with that guide https://retropie.org.uk/forum/topic/295/retropie-and-waveshare-32b/2 after that i installed GPIOnext https://github.com/mholgatem/GPIOnext by using gpionext configure as a keyboard. worked fine



  • so guys i had problems with the GPIOnext and the waveshare driver that i had. They both used pins at the same time.
    Thanks mholgatem the programmer of the program he gave me some commands to type in,to configure the buttons with the right pins that are usable. So guys i wired this thing just with the single purpose of using pins who are not used and dont damage the raspberry or the display . So the commands are with my ports .

    MY SETTINGS
    [
    sudo python3 /home/pi/GPIOnext/config_manager.py --pins 3,5,22,10,7,29,31,32,33,35,36,37,38,40

    gpionext set pins 3,5,22,10,7,29,31,32,33,35,36,37,38,40

    gpionext reload

    sudo reboot
    //if you soldered your wires to different ports you can add them in the line down below !
    [
    sudo python3 /home/pi/GPIOnext/config_manager.py --pins 29,31,32,33,35,36,37,38,40

    gpionext set pins 29,31,32,33,35,36,37,38,40

    gpionext reload

    sudo reboot
    ]



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.