Attempting to use GPIO 14, 15, 18 for button input
-
First off - brand new to pi/retropi - sorry for being stubborn/dopey. I am technical at software level, not hardware level.
Raspberry PI 3B - Retro Pie-Setup Git show says bump version to 4.1.15
built a box using 2 player kit from retrobuiltgames which uses arcade style buttons and sanwa joysticks and everything is working great. Except I don't have enough pins for player 2's 5th and 6th buttons - which I'm sure you are are familiar with. Even though it's not used in many places, I'm one of those people.
So poking around I see pins 14, 15, 18 are free, but 'special'. Doing a bunch of googling I say this seems like something we can do. Say to myself, "Don't know why there isn't a post on how to do it, however I can't seem to find anything complete after a fair bit of searching." Anyway - not working and looking for some help or pointers please.
What I've done:
Backed up the SD card
Edited cmdline.txt and removed console=ttyAMA0,115200 from command line
Edited config.txt:
Added dtparam=uart0=off
dtoverlay=pi3-disable-bt
Ran raspi-config and also disabled serial input there (it already new serial console was off) - this added enable_uart=0 to config.txtran sudo systemctl disable hciuart
Added entries to both maps in retrogame.c for 14, 15, 18 to map to KEY_M, KEY_N and KEY_O and compiled it. Looks like it comiles (i.e. retrogame binary timestamp updates)
Added entries to /opt/retropie/configs/all/retroarch.cfg to add input_player2_l and input_player_2_r to the pin 18 and 15 letters.
Plugged in buttons to pins 18 and 15.
Results:
When I drop out to the terminal from emulator - I can get the button attached to Pin 18 to output a letter. (more on this). When I press the other button still nothing.Wanting to at least taste 50% of success, I fired up Street Fighter 2 2 player mode to test it out. Sure enough Ken gets one of his actions back, but it seems to briefly pause the device every time I press the button. So clearly not even 50% of success.
I read something about 5v/3.3v levelers for gpio pins 14/15 but didnt really seem to be something I could get my hands on.
Can someone tell me how doomed to failure this effort is or point me to where to go to next?
Thanks in advance.
-
This post is deleted!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.