'A' and 'B' buttons not working on Pi Zero W
-
Basic infomation
Pi Model: Raspberry Pi Zero W
Power Supply used: 5V USB
RetroPie Version Used :retropie-4.4-rpi1_zero.img
Built From: official SD card img file(see above)
USB Devices connected: 32GB SanDisk
Controller used: wareshare 1.44inch LCD display HAT for Raspberry Pi
Guide used: this pageThe problem
In the guide, it provides a
/boot/retrogame.cfg
file example:# Sample configuration file for retrogame. # Really minimal syntax, typically two elements per line w/space delimiter: # 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h). # 2) a GPIO pin number; when grounded, will simulate corresponding keypress. # Uses Broadcom pin numbers for GPIO. # If first element is GND, the corresponding pin (or pins, multiple can be # given) is a LOW-level output; an extra ground pin for connecting buttons. # A '#' character indicates a comment to end-of-line. # File can be edited "live," no need to restart retrogame! # Here's a pin configuration for the PiGRRL 2 project: LEFT 6 # Joypad left RIGHT 19 # Joypad right UP 5 # Joypad up DOWN 0 # Joypad down LEFTCTRL 14 # 'A' button LEFTALT 23 # 'B' button Z 27 # 'X' button X 22 # 'Y' button SPACE 15 # 'Select' button ENTER 26 # 'Start' button #A 12 # Left shoulder button #S 13 # Right shoulder button #ESC 17 # Exit ROM; PiTFT Button 1 #1 22 # PiTFT Button 2 #2 23 # PiTFT Button 3 #3 27 # PiTFT Button 4 # For configurations with few buttons (e.g. Cupcade), a key can be followed # by multiple pin numbers. When those pins are all held for a few seconds, # this will generate the corresponding keypress (e.g. ESC to exit ROM). # Only ONE such combo is supported within the file though; later entries # will override earlier.
With interface definition from the wareshare site, I modified the file as such:
LEFT 5 # Joypad left RIGHT 26 # Joypad right UP 6 # Joypad up DOWN 19 # Joypad down LEFTCTRL 21 # 'A' button LEFTALT 20 # 'B' button #Z 21 # 'X' button #X 20 # 'Y' button SPACE 13 # 'Select' button ENTER 16 # 'Start' button #A 12 # Left shoulder button #S 13 # Right shoulder button #ESC 17 # Exit ROM; PiTFT Button 1 #1 22 # PiTFT Button 2 #2 23 # PiTFT Button 3 #3 27 # PiTFT Button 4
All the buttons are fine excpet LEFTCTRL and LEFTALT.
I tried to use different pins for these two buttons to check if it's because my controllers on the LCD HAT are broken, but the problem remains.
Now I cannot even entera game from the main page for I can't press button 'A'.
Any suggestion would be appreciated.
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.