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

Various user-contributed guides for hardware-related things
prerunnerseth
Posts: 279
Joined: Fri May 06, 2016 5:36 pm
Has thanked: 16 times
Been thanked: 229 times

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

Post by prerunnerseth » Mon Aug 01, 2016 6:06 am

Racerboy wrote:Image

@prerunnerseth So it can't configure pin 23, which is BCM 11 (SCLK), which is being used by my display. But I'm not sure why that matters because in the retrogame.c code, BCM 11 isn't even referenced, and that pin shouldn't even be used by retrogame.
It can't configure BCM 23 (Pin 16, LEFT) not PIN 23. You either have something else connected to it or your TFT driver or something else has configured that pin before retrogame.

Racerboy
Posts: 129
Joined: Thu Jun 02, 2016 4:49 pm
Has thanked: 25 times
Been thanked: 36 times

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

Post by Racerboy » Mon Aug 01, 2016 9:09 am

prerunnerseth wrote:
Racerboy wrote:Image

@prerunnerseth So it can't configure pin 23, which is BCM 11 (SCLK), which is being used by my display. But I'm not sure why that matters because in the retrogame.c code, BCM 11 isn't even referenced, and that pin shouldn't even be used by retrogame.
It can't configure BCM 23 (Pin 16, LEFT) not PIN 23. You either have something else connected to it or your TFT driver or something else has configured that pin before retrogame.
Oh ok - I'll try a fresh install of Retropie, get the controls working, then move on to the display. Thanks :)

User avatar
Jedi Nobjoblin
Posts: 19
Joined: Thu Jul 28, 2016 6:36 pm
Location: Pacifica,CA
Has thanked: 1 time
Been thanked: 3 times
Contact:

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

Post by Jedi Nobjoblin » Tue Aug 02, 2016 1:34 am

When I input the command to see if ./retrogame is working I just get a blinking underscore below the text am I doing something wrong should I see some code or config populate? I enclosed what shows up when i boot Retropie, says :Not Found, please help me. Thanks for your time.
Attachments
FullSizeRender.jpg
FullSizeRender.jpg (390.75 KiB) Viewed 16576 times
IMG_0332.JPG
IMG_0332.JPG (2.09 MiB) Viewed 16576 times
〜( ̄△ ̄〜)

User avatar
m0rphman
Posts: 22
Joined: Tue May 10, 2016 10:17 am
Has thanked: 1 time
Been thanked: 3 times

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

Post by m0rphman » Fri Aug 05, 2016 1:43 pm

Hi guys,

I am having a little trouble with this setup. I installed everything as was described here and all of the keys work fine in the emulationstation menu. However, whenever I enter a game, they stop working and I can't do anything at all.
Has anyone else seen this?

EDIT: Ok, I'm an idiot :D I didn't copy the retrogame rule properly. Instead of the curly braces, I used normal ones. Now it works like a charm. Thanks again @prerunnerseth!

m0rphman

Deramin
Posts: 20
Joined: Wed Jun 08, 2016 7:38 pm
Has thanked: 3 times
Been thanked: 1 time

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

Post by Deramin » Fri Sep 02, 2016 9:53 am

Hey I was hoping for some help with this. I have followed all the steps givin however I am using GPI0 pin 34 (GND) as ground and I assume I need to edit the retrogame.c file but I am not understanding how to do that exactly.

Thanks for the help guys :)

cvp
Posts: 20
Joined: Wed Aug 31, 2016 12:11 pm

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

Post by cvp » Mon Sep 12, 2016 7:45 am

Hello, I want to use this GPIO method. It has worked so far as. The buttons are recognized under Retropi and I can configure the keys. Also, I can with the D-Pad, the Move the Retropi Menü (Up, down, left, right). A + B (Enter+go Back) and Start / Select access to settings very well!
But when start a game (i try with Gameboy/SNES Emulator) then all buttons not working. When I connect a keyboard it works well (Keyboard, not Gameboy Board)

With the keyboard I start then a game. Then I cut the connection between the keyboard and Rpi0. so I wanted to check if other buttons such as up, down, left, right working /Gameboy Input). Unfortunately not.

Do I need to adjust anything more on GB / SNES emulator?

I look forward to an early reply. thank you in advance

cvp
Posts: 20
Joined: Wed Aug 31, 2016 12:11 pm

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

Post by cvp » Wed Sep 14, 2016 1:18 am

I try all from begin and burn the retropi image on the sd card. Setting up the Keyboard. Shut down, put the scard to my pc, create a dir in /home/pi/Adafruit-Retrogame. Copy the retrogame.c in to. Put the SDcard in the Rpi. Exit Retropi to get the Terminal view. do "cd /home/pi/Adafruit-Retrogame" and "make retrogame" , after that i get this message:

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

how do i handle with it now? i use my TFT not over GPIO. I use the Video Pins.

prerunnerseth
Posts: 279
Joined: Fri May 06, 2016 5:36 pm
Has thanked: 16 times
Been thanked: 229 times

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

Post by prerunnerseth » Wed Sep 14, 2016 7:55 am

cvp wrote:I try all from begin and burn the retropi image on the sd card. Setting up the Keyboard. Shut down, put the scard to my pc, create a dir in /home/pi/Adafruit-Retrogame. Copy the retrogame.c in to. Put the SDcard in the Rpi. Exit Retropi to get the Terminal view. do "cd /home/pi/Adafruit-Retrogame" and "make retrogame" , after that i get this message:

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

how do i handle with it now? i use my TFT not over GPIO. I use the Video Pins.
you have to be missing something or making a mistake somewhere in the instructions. I have never seen this error.

cvp
Posts: 20
Joined: Wed Aug 31, 2016 12:11 pm

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

Post by cvp » Wed Sep 14, 2016 9:35 am

hmm.... i download the latest version from retropi here (https://retropie.org.uk/download/) - sure, for RPi0/1. Flash it on the SD Card. Start one time to configure my Keyboard.... and than the other stuff like on the first page. Only one different thing is, that i dont use FTP/SSH to copy the retrogame.c in to the sd card. I copy it with a SD Card reader. Or will this message tell me that something ist wrong with my soldering?

cvp
Posts: 20
Joined: Wed Aug 31, 2016 12:11 pm

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

Post by cvp » Thu Sep 15, 2016 2:26 am

Oh man. So I found my problem. since I use a German keyboard, I have entered a Z in place y:
SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEZBOARD}="1"

Now everything works :)

The error message I have not get away. I do not know what it is. But as long as there is everything works okay :)
Now i continue with PWM Audio :P

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest