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

Various user-contributed guides for hardware-related things
Ndmp
Posts: 2
Joined: Mon Sep 19, 2016 10:22 am

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

Post by Ndmp » Sat May 13, 2017 12:51 pm

Hi there,

did everything according to the instructions. Testing works while i run retro game. However after i restart the buttons don't work anymore unless i start retro game. there seems to be a problem with automatically running retro game on system boot ?
I put this line
/home/pi/Adafruit-Retrogame/retrogame &
ove the exit 0 Line

Any pointer what i could be doing wrong?

onesojourner
Posts: 101
Joined: Tue Dec 13, 2016 10:23 am
Has thanked: 21 times
Been thanked: 12 times

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

Post by onesojourner » Wed May 17, 2017 2:20 pm

Ndmp wrote:
Sat May 13, 2017 12:51 pm
Hi there,

did everything according to the instructions. Testing works while i run retro game. However after i restart the buttons don't work anymore unless i start retro game. there seems to be a problem with automatically running retro game on system boot ?
I put this line
/home/pi/Adafruit-Retrogame/retrogame &
ove the exit 0 Line

Any pointer what i could be doing wrong?
Look into setting up a cron job. I did this on an NES project and it worked perfect.

User avatar
Roachman5000
Posts: 8
Joined: Sat Apr 15, 2017 7:01 pm
Has thanked: 7 times
Been thanked: 4 times

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

Post by Roachman5000 » Sat May 20, 2017 9:41 pm

Is it possible/will it still work, to change the allocation of 'e' as 'Start' and move it to the Enter key instead?

Reason I ask is that when you go into the Retropie setup/config files to change/select settings, using the current keyboard-to-button mapping does not allow for navigation beyond using the d-pad, so unless you have a keyboard plugged in you cannot change settings around.

I was wondering if doing that would have effects on using Retropie writ large.

*********EDIT: Asked and answered. if you go into the retrogame.c file and change "KEY_E" to "KEY_ENTER" and then go through the rest of the tutorial you will have the ability navigate through Retropie Setup and Config files, which adds a layer of utility to the process especially if you use this tutorial in conjunction with the PRS Tech SNES Zero project.**************

methuper
Posts: 4
Joined: Sun Apr 30, 2017 9:42 am

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

Post by methuper » Tue May 30, 2017 1:47 pm

I actually got that part figured out. I had accidentily spelled Sub system "ub system". So I have my input working. Now I am stuck on the audio out using the Adafruit MAX98357. But that does not belong in this thread.

User avatar
marketus
Posts: 106
Joined: Sun Dec 18, 2016 9:35 am
Location: Ferrol, Spain
Has thanked: 23 times
Been thanked: 6 times

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

Post by marketus » Tue Jun 06, 2017 3:18 pm

@prerunnerseth for this GPIO configuration do I need to wire the button pcb to the GPIO previously? I understand your guide but not if I need to have the rasp accesible o can be glued to the case. Thanks for your effort

vic1707
Posts: 1
Joined: Wed Jun 14, 2017 2:18 pm

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

Post by vic1707 » Wed Jun 14, 2017 2:34 pm

Hello, first i'm sorry for my english : i'm french and so bad with english so i use google trad for this post...
I have done all the tuto on mi pi zero w all works but i don't have reply for start and select...
I am sure of my wiring, buttons in them (I have tested them on a functional gameboy) and I am sure of my pcb because when I change the wires so that press start is recognized as pressing a, everything works Without problem but still no response from start nor select no matter the wiring and pressed button ... do you have an idea of ​​my problem and how to solve it?
thanks
Last edited by vic1707 on Fri Jun 23, 2017 3:36 am, edited 1 time in total.

emaborsa
Posts: 27
Joined: Sun Oct 02, 2016 1:58 am
Has thanked: 4 times
Been thanked: 1 time

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

Post by emaborsa » Wed Jun 21, 2017 11:55 pm

crispy_tofu wrote:
Sun May 08, 2016 7:55 pm
A teensy makes it easier to do this, and it might eliminate any compatibility problems with the emulators. :)
Hi, could you (or someone else) tell me more about the statement in bold?

User avatar
rodocop
Posts: 1613
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 584 times
Been thanked: 578 times

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

Post by rodocop » Wed Jun 28, 2017 12:50 pm

emaborsa wrote:
Wed Jun 21, 2017 11:55 pm
crispy_tofu wrote:
Sun May 08, 2016 7:55 pm
A teensy makes it easier to do this, and it might eliminate any compatibility problems with the emulators. :)
Hi, could you (or someone else) tell me more about the statement in bold?
I've never had any compatibility issues using this method....Not sure what he meant by that.

User avatar
moosepr
Posts: 523
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

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

Post by moosepr » Thu Jun 29, 2017 3:32 am

the only thing i can think is the SDL2 issues mentioned here

https://github.com/adafruit/Adafruit-Re ... patibility
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

emaborsa
Posts: 27
Joined: Sun Oct 02, 2016 1:58 am
Has thanked: 4 times
Been thanked: 1 time

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

Post by emaborsa » Wed Jul 05, 2017 11:42 pm

moosepr wrote:
Thu Jun 29, 2017 3:32 am
the only thing i can think is the SDL2 issues mentioned here

https://github.com/adafruit/Adafruit-Re ... patibility
Since my mothertongue is not english...or maybe I simply don't understand.... what is SDL2? Does Retropie work to 100% by using the GPIO instead teensy?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest