Page 10 of 10

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

Posted: Sun Aug 12, 2018 12:33 pm
by snoek09
Yes, that's correct. As long as you update retrogame.c with the correct values it should be fine.

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

Posted: Fri Sep 07, 2018 2:44 pm
by markag
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.

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

Posted: Fri Sep 07, 2018 3:21 pm
by Helder
Yes you can.

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

Posted: Mon Sep 10, 2018 1:51 pm
by markag
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.

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

Posted: Wed Sep 12, 2018 6:41 am
by goosewerks
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.

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

Posted: Sat Oct 06, 2018 10:27 pm
by Hunter Miller-Moreno
It works in emulation station, but for some reason after I load a game it no longer works. Advice??

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

Posted: Thu Nov 08, 2018 3:36 pm
by Kabuki
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/

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

Posted: Sat Oct 12, 2019 9:10 pm
by sonyeoneon
It works perfectly, but, now i want to add R2, L2 and the hotkey, i have already modify the charts in retrogame.c in my computer, do i have to re-do all from the beginig to update the new buttons?

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

Posted: Sat Nov 16, 2019 1:24 am
by Lphillimore
sonyeoneon wrote:
Sat Oct 12, 2019 9:10 pm
It works perfectly, but, now i want to add R2, L2 and the hotkey, i have already modify the charts in retrogame.c in my computer, do i have to re-do all from the beginig to update the new buttons?
No, just pick 2x free GPIO and use those for your L2 and R2 and modify / extend the script.

You can use an existing key / button GPIO as your Hotkey.