Homepage › Forums › RetroPie Project › GPIO Adapter, ControlBlock etc. › Problem with pikeyd and Push Buttons
- This topic has 1 reply, 2 voices, and was last updated 8 years, 9 months ago by zigurana.
-
AuthorPosts
-
10/24/2015 at 21:24 #108310AnonymousInactive
Hey guys. Wondering if someone may be able to help me with a little problem I am having getting pikeyd to work with 2 buttons I have connected directly to the GPIO pins. For the life of me, I can’t figure out what I’m missing. It is likely something small and mundane, but here is what I have done so far… (The issue is in Step 6)
Hardware used:
– Raspberry Pi 2
– Mausberry Shutdown Circuit
– 2A 5V Power Supply
– SNES Controller Ports
– SNES Toggle Power Switch
– 2 x Momentary Push Buttons
– 2 x 1Kohm Resistors
– 2 x 10Kohm Resistors
– 32 GB SanDisk Ultra Micro SD1. Downloaded and flashed RetroPie version 3.1 for Raspberry Pi 2 to SD card.
2. Filesystem Expanded
– Started up RetroPie
– Exited with F4
– Ran raspi-config
– Expanded Filesystem
– Rebooted pi3. Updated pi
– Exited EmulationStation with F4
– sudo apt-get update
– sudo apt-get upgrade
– Rebooted pi4. Installed Muasberry Shutdown Circuit
– Exited EmulationStation with F4
– sudo wget http://files.mausberrycircuits.com/setup.sh
– sudo bash setup.sh
– Shutdown pi
– Connected Mausberry Shutdown Circuit to MicroUSB connector
– Connected In and Out headers on Mausberry Shutdown Circuit to GPIO pin 18 (GPIO24) and pin 16 (GPIO23)
– Connected SNES toggle power switch to Mausberry Shutdown Circuit board
– Powered on pi and tested Shutdown Circuit
– Works!5. Installed SNES Controller Ports
– Exited EmulationStation with F4
– sudo ./RetroPie-Setup/retropie_setup.sh
– Chose option 3 Setup / Configuration (to be used post install)
– Chose option 308 Gamecon & db9 drivers
– Enabled driver perminantly
– Shutdown pi
– Connected SNES Controller Ports
+5v to Pin 1 (3.3V)
Ground to Pin 6 (GND)
Controller 1 Data to Pin 5 (GPIO 3)
Controller 2 Data to Pin 7 (GPIO 4)
Clock to Pin 19 (GPIO 9)
Latch to Pin 23 (GPIO 11)
– Powered on pi and programed EmulationStarion with Controller 1 controlls and tested.
– Works!6. Connected 2 momentary push buttons for exit and reset
– Exited EmulationStation with F4
– git clone git://github.com/mmoller2k/pikeyd
– make -C pikeyd
– sudo cp pikeyd/pikeyd /usr/local/bin/
– sudo nano /etc/rc.local
– Added “/usr/local/bin/pikeyd -d” at end of file, one line before “exit 0” but one line after “/etc/switch.sh &” <– Mausberry Shutdown Circuit
– sudo cp pikeyd/pikeyd.conf /etc
– sudo nano /etc/pikeyd.conf
– Commented out all lines with # except for lines:
– KEY_R 18
– KEY_ESC 25
– Saved and exited pikeyd.conf
– sudo nano /etc/modules
– Checked to be sure uinput is on list of modules to start at boot.
– Shutdown pi
– Connected both momentary push buttons via the following diagram:
– Powered on pi and tested button presses
– Does not work :(When pressed, buttons should mimic keyboard presses R and ESC, but do nothing. I have checked all continuity and it seems to be fine. Switches close properly. Voltage at switches reads 2.7V and drops to 0.0V when depressed.
I am not sure what I have missed that would cause this not to work, any help would be appreciated.
03/01/2016 at 08:25 #118668ziguranaParticipantHey,
Thanks for the extensive write-up, I was planning to use this approach to add some push buttons for exit, reset, save etc.Did you finally manage to get this to work?
-
AuthorPosts
- The forum ‘GPIO Adapter, ControlBlock etc.’ is closed to new topics and replies.