Pi Zero gpio help

Hardware-related questions that don't fit into any of the specialized hardware categories go here.
Post Reply
Deramin
Posts: 20
Joined: Wed Jun 08, 2016 7:38 pm
Has thanked: 3 times
Been thanked: 1 time

Pi Zero gpio help

Post by Deramin » Mon Sep 05, 2016 2:02 pm

Hey all!

So I have connected my buttons to my pi zero and followed the steps listed in this guide
http://www.sudomod.com/forum/viewtopic.php?f=22&t=57

I am using hole 34 as the ground So I assume I need to edit the script to represent that but im not sure exactly how to do that.

This is whats in the script by default. How exactly do I write it to make pin 34 the GND.
{ 23, KEY_LEFT }, // Joystick (4 pins)
{ 0, KEY_RIGHT },
{ 1, KEY_DOWN },
{ 22, KEY_UP },
{ 12, KEY_E }, // START
{ 5, KEY_S }, // SELECT
{ 16, KEY_A }, // A
{ 6, KEY_B }, // B
{ 19, KEY_Y }, // Y
{ 26, KEY_X }, // X
{ 20, KEY_R }, // RT
{ 21, KEY_L }, // LT

{ -1, -1 } }; // END OF LIST, DO NOT CHANGE

Thank you all for the help :)

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Pi Zero gpio help

Post by Zero » Mon Sep 05, 2016 2:33 pm

You don't need to setup/tell anything to use the ground pin, you're good to go already (assuming every button you have made has a connection to ground).

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

Re: Pi Zero gpio help

Post by Deramin » Mon Sep 05, 2016 2:43 pm

Zero wrote:You don't need to setup/tell anything to use the ground pin, you're good to go already (assuming every button you have made has a connection to ground).
If that is the case then I have failed somewhere else. I am currently reusing the gameboy sp PCB ,I have a common ground going from the SP PCB to the pin 34. I have wires connecting each button input on the SP PCB to the corresponding pins in the guide.

I get a reaction on a volt meter to all the buttons so I assume its all connected and whatnot. I likely did something else wrong.

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Pi Zero gpio help

Post by Zero » Mon Sep 05, 2016 2:57 pm

I don't think the problem is your wiring, it's probably software. What program/programs are you trying to set the GPIO pins up with?

I recommend Gpioneer as it basically automates everything for you.
https://github.com/mholgatem/gpioneer

After that, if you're running RetroPie, then you can easily map the buttons.

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

Re: Pi Zero gpio help

Post by Deramin » Mon Sep 05, 2016 3:29 pm

Zero wrote:I don't think the problem is your wiring, it's probably software. What program/programs are you trying to set the GPIO pins up with?

I recommend Gpioneer as it basically automates everything for you.
https://github.com/mholgatem/gpioneer

After that, if you're running RetroPie, then you can easily map the buttons.
Well that there may well be my problem haha. Unless it was something I was told to do via that guide I likely did not do it.
Ill look into that and thanks much for the help!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest