Page 5 of 10

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

Posted: Sat Sep 17, 2016 2:34 pm
by myPiZero
As some of you maybe saw in my show-off forum post I used this method to wire the controls. The problem is that after a while some buttons stopped reacting. I verified that the GPIO pin of the malfunctioning buttons have failed (when I switched it to another pin and recompiled retrogame.c it worked again). By my opinion this method is unreliable because of the low integrity of the pins. I don't understand why they failed, but about 4 pins are more than can be repaired. I eventually wired it through an Arduino. It actually looks better now because the wires are a lot shorter. I just need to connect the USB.
Image

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

Posted: Mon Sep 19, 2016 10:05 am
by prerunnerseth
myPiZero wrote:As some of you maybe saw in my show-off forum post I used this method to wire the controls. The problem is that after a while some buttons stopped reacting. I verified that the GPIO pin of the malfunctioning buttons have failed (when I switched it to another pin and recompiled retrogame.c it worked again). By my opinion this method is unreliable because of the low integrity of the pins. I don't understand why they failed, but about 4 pins are more than can be repaired. I eventually wired it through an Arduino. It actually looks better now because the wires are a lot shorter. I just need to connect the USB.
Image
I would verify completely before you make these statements. The Pins on the Pi Zero are made to be use this way. There is a weak pull up that holds the pin up and you pull it low with a button. There is no reason this will damage a pin. Retrogame is used on TONS of projects not just in GBZ builds. Mame cabinets and the such. I suspect you are doing something wrong to be damaging pins. My personal GBZ build is running this setup and is completely reliable.

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

Posted: Thu Sep 22, 2016 12:11 pm
by Tim
Hey guys,

i did the tutorial exactly as shown but on Retropie 4.0. Everytime i do

Code: Select all

make retrogame
i just get an error message but i didn't change anything in the table so my problem can't be caused by this like it says in the tutorial. Can anyone please help me?

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

Posted: Thu Sep 22, 2016 12:43 pm
by prerunnerseth
Tim wrote:Hey guys,

i did the tutorial exactly as shown but on Retropie 4.0. Everytime i do

Code: Select all

make retrogame
i just get an error message but i didn't change anything in the table so my problem can't be caused by this like it says in the tutorial. Can anyone please help me?
What is the error message?

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

Posted: Thu Sep 22, 2016 1:21 pm
by Tim
It says

Code: Select all

make: warning: Clock skew detected. You build may be incomplete.

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

Posted: Thu Sep 22, 2016 2:27 pm
by myPiZero
I believe you can ignore this message.
stackoverflow
That message is usually an indication that some of your files have modification times later than the current system time. Since make decides which files to compile when performing an incremental build by checking if a source files has been modified more recently than its object file, this situation can cause unnecessary files to be built, or worse, necessary files to not be built.

However, if you are building from scratch (not doing an incremental build) you can likely ignore this warning without consequence.

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

Posted: Fri Sep 23, 2016 8:05 am
by Tim
Thanks! Got it working :D

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

Posted: Fri Sep 23, 2016 8:28 am
by Zero
If anyone ever has any problems with Adafruit's Retrogame software then there's an alternative that works really well called 'Gpioneer'. Takes a while to install but it's all automated and much easier to use. Info on how to install it here:

https://github.com/mholgatem/gpioneer

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

Posted: Wed Sep 28, 2016 1:48 am
by musty_666
Be careful with this! I found a guy that did a gameboy using the GPIO buttons instead of a teensy and because having GPIO handling the buttons and the audio, some buttons didn't work for him!

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

Posted: Wed Sep 28, 2016 7:40 am
by prerunnerseth
musty_666 wrote:Be careful with this! I found a guy that did a gameboy using the GPIO buttons instead of a teensy and because having GPIO handling the buttons and the audio, some buttons didn't work for him!
This would only be an issue if you tried to map buttons to the GPIO pins used for PWM audio. I specifically avoided those pins in this version of retropie.