How to - Use the GPIO for Buttons instead of a Teensy
Re: How to - Use the GPIO for Buttons instead of a Teensy
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.
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.
- Helder
- Trailblazer
- Posts: 2810
- Joined: Thu May 05, 2016 8:33 am
- Location: Rogers, AR
- Has thanked: 1420 times
- Been thanked: 3081 times
Re: How to - Use the GPIO for Buttons instead of a Teensy
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!
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!
Re: How to - Use the GPIO for Buttons instead of a Teensy
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.
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.
- goosewerks
- Posts: 87
- Joined: Mon May 22, 2017 8:27 am
- Has thanked: 16 times
- Been thanked: 33 times
Re: How to - Use the GPIO for Buttons instead of a Teensy
No you do not. You just have to connect the GPIO pin to a GPIO ground completing each circuit per button press.markag wrote: ↑Mon Sep 10, 2018 1:51 pmMaybe 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.
-
- Posts: 2
- Joined: Sat Sep 15, 2018 12:59 pm
Re: How to - Use the GPIO for Buttons instead of a Teensy
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
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/
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/
-
- Posts: 1
- Joined: Sat Oct 12, 2019 8:37 pm
Re: How to - Use the GPIO for Buttons instead of a Teensy
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?
- Lphillimore
- Posts: 986
- Joined: Sat Jan 07, 2017 7:03 pm
- Location: Perth, WA
- Has thanked: 785 times
- Been thanked: 513 times
Re: How to - Use the GPIO for Buttons instead of a Teensy
No, just pick 2x free GPIO and use those for your L2 and R2 and modify / extend the script.sonyeoneon wrote: ↑Sat Oct 12, 2019 9:10 pmIt 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?
You can use an existing key / button GPIO as your Hotkey.
mintyPi Giveaway [CLOSED]:
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
http://www.sudomod.com/forum/viewtopic.php?f=38&t=3456
Builds:
GBZ
http://www.sudomod.com/forum/viewtopic.php?f=9&t=2838
mintyPi
http://www.sudomod.com/forum/viewtopic.php?f=32&t=3468
Kite SAIO
http://www.sudomod.com/forum/viewtopic.php?f=9&t=3075
Dreamcast VMU
https://sudomod.com/forum/viewtopic.php ... 133#p62133
Who is online
Users browsing this forum: No registered users and 0 guests