How to - Use the GPIO for Buttons instead of a Teensy

Various user-contributed guides for hardware-related things
snoek09
Posts: 140
Joined: Sat May 20, 2017 3:06 am
Location: Amsterdam, The Netherlands
Has thanked: 44 times
Been thanked: 42 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by snoek09 » Sun Aug 12, 2018 12:33 pm

Yes, that's correct. As long as you update retrogame.c with the correct values it should be fine.

markag
Posts: 3
Joined: Tue Sep 04, 2018 1:02 pm

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by markag » Fri Sep 07, 2018 2:44 pm

Does this also work for full sized raspberry pi boards (pi 2 or pi 3)?

Looking to build my own handheld RetroPie gaming device with the 7" pi screen. Would be interested in doing GPIO buttons for that to keep the USB ports free and cost down.

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2369
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1253 times
Been thanked: 2886 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by Helder » Fri Sep 07, 2018 3:21 pm

Yes you can.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

markag
Posts: 3
Joined: Tue Sep 04, 2018 1:02 pm

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by markag » Mon Sep 10, 2018 1:51 pm

Maybe It's a silly question... Do I need to apply 5V power to the buttons to make them function?

I breadboarded out a controller with buttons that bridge back from the GPIO pin to ground. Some of the buttons worked, others didn't. I was concerned on those that did not work that I maybe had a wiring issue or bad connection on my button, so I tried manually connecting the IP pin to my ground as a button press, and still got nothing.

Was using a Raspberry Pi 3B+

The only buttons that worked were connected to BCM 0, 5, & 6. I was using the ground from pin 39 for all the buttons.

I didn't install onto a clean RetroPie build, but it was pretty close to clean. I'm using the Raspberry Pi official 7" touchscreen, my retropie build has a few skins, and I ran the retropie update on it at one point in time. That's it. I didn't have any errors or anything when going through the setup.

User avatar
goosewerks
Posts: 84
Joined: Mon May 22, 2017 8:27 am
Has thanked: 16 times
Been thanked: 30 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by goosewerks » Wed Sep 12, 2018 6:41 am

markag wrote:
Mon Sep 10, 2018 1:51 pm
Maybe It's a silly question... Do I need to apply 5V power to the buttons to make them function?

I breadboarded out a controller with buttons that bridge back from the GPIO pin to ground. Some of the buttons worked, others didn't. I was concerned on those that did not work that I maybe had a wiring issue or bad connection on my button, so I tried manually connecting the IP pin to my ground as a button press, and still got nothing.

Was using a Raspberry Pi 3B+

The only buttons that worked were connected to BCM 0, 5, & 6. I was using the ground from pin 39 for all the buttons.

I didn't install onto a clean RetroPie build, but it was pretty close to clean. I'm using the Raspberry Pi official 7" touchscreen, my retropie build has a few skins, and I ran the retropie update on it at one point in time. That's it. I didn't have any errors or anything when going through the setup.
No you do not. You just have to connect the GPIO pin to a GPIO ground completing each circuit per button press.

Hunter Miller-Moreno
Posts: 2
Joined: Sat Sep 15, 2018 12:59 pm

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by Hunter Miller-Moreno » Sat Oct 06, 2018 10:27 pm

It works in emulation station, but for some reason after I load a game it no longer works. Advice??

Kabuki
Posts: 1
Joined: Thu Nov 08, 2018 3:29 pm

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by Kabuki » Thu Nov 08, 2018 3:36 pm

hello ! im so close i feel...
this works upon entering the command
" sudo ./retrogame "
i can navigate through the retropie menu and play games with working buttons.
however after entering the command to have it launch automatically on boot ;
" /home/pi/Adafruit-Retrogame/retrogame & "

it does not take effect and i have to re enter " sudo ./retrogame " to have button function back..

im using a Pi zero w with a common ground 4 button pcb.. so close ! THANKS!

"UPDATE" fixed..
i tried this and worked upon a reboot ... https://www.tinkerboy.xyz/retropie-sdca ... r-support/

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests