change GPIO pins

This commit is contained in:
ohsqueezy 2023-03-30 16:32:36 -07:00
parent 416df5d15d
commit 52fe139702
4 changed files with 9 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
games/*
!games/__init__.py
local/
www/

View File

@ -15,8 +15,8 @@ except ImportError:
class Playzing(pgfw.Game):
# The GPIO pins corresponding to the buttons
PIN_BUTTON_LEFT = 17
PIN_BUTTON_RIGHT = 27
PIN_BUTTON_LEFT = 23
PIN_BUTTON_RIGHT = 24
def __init__(self, config_overrides=None):
"""

View File

@ -107,9 +107,9 @@ After setting up the Raspberry Pi and screen, build and test the gamepad.
### Buttons
Two buttons need to be connected to the Raspberry Pi's GPIO 17 and 27, and each also needs to connect to the Raspberry Pi's ground pin. In the software, the input pins are set to pull-up to create a high signal when the button is unpressed. When the button is pressed, it connects the input pin to the ground pin, and the signal is pulled low.
Two buttons need to be connected to the Raspberry Pi's GPIO 23 and 24, and each also needs to connect to the Raspberry Pi's ground pin. In the software, the input pins are set to pull-up to create a high signal when the button is unpressed. When the button is pressed, it connects the input pin to the ground pin, and the signal is pulled low.
The buttons can be connected with a regular breadboard before being soldered into the prototype breadboard. The black wires in the photo are connected to ground (pin 9 on the Pi). The yellow wire is connected to GPIO 17 (also known as pin 11), and the orange wire is connected to GPIO 27 (also known as pin 13).
The buttons can be connected with a regular breadboard before being soldered into the prototype breadboard. The black wires in the photo are connected to ground (pin 14 on the Pi). The yellow wire is connected to GPIO 23 (also known as pin 16), and the orange wire is connected to GPIO 24 (also known as pin 18).
![Buttons_on_breadboard.jpg](img/manual/Buttons_on_breadboard.jpg)
@ -123,7 +123,7 @@ If using the same JST connector linked in the supplies, use the smaller section
The placement of the JST wires may depend on the breadboard, but it is recommended to connect each wire toward the bottom (closer to the player) so that the sheathed parts of the wires can lay flat against the underside and emerge from the top (closer to the device). If preferred, the wires can be shortened and re-stripped so they fit without bending, making them easier to solder. The wires should be inserted on the underside and soldered at the top of the board.
Once the wires are soldered, connect them to the buttons using solder to create bridges between the pin holes on the underside of the board. The exact connections will depend on the board, but the ground wire should connect to both buttons (using any of the button pins), the middle wire should connect to the left button, and the last wire should connect to right button, making sure not to directly connect ground to either of the GPIO pins. In the photo, the white wire is ground, the green wire is GPIO 17, and the red wire is GPIO 27.
Once the wires are soldered, connect them to the buttons using solder to create bridges between the pin holes on the underside of the board. The exact connections will depend on the board, but the ground wire should connect to both buttons (using any of the button pins), the middle wire should connect to the left button, and the last wire should connect to right button, making sure not to directly connect ground to either of the GPIO pins. In the photo, the white wire is ground, the green wire is GPIO 23, and the red wire is GPIO 24.
![Gamepad circuit board soldered](img/manual/Gamepad_circuit_board_soldered.jpg)
@ -131,7 +131,7 @@ Hot glue the wires onto the underside of the board.
![Gamepad internal wiring glue](img/manual/Gamepad_internal_wiring_glue.jpg)
Attach the socket end of the three JST wires to the Raspberry Pi's GPIO pins 9, 11, and 13 (ground, GPIO 17, and GPIO 27). The gamepad buttons should be working to control iBitFit.
Attach the socket end of the three JST wires to the Raspberry Pi's GPIO pins 14, 16, and 18 (ground, GPIO 23, and GPIO 24). The gamepad buttons should be working to control iBitFit.
Screen mount
------------
@ -152,7 +152,7 @@ Drill shallow holes for the screen screws into the wood block using a thin drill
![Wood blocks pre-drilled](img/manual/Wood_blocks_pre_drilled.jpg)
Drill the `#6 1 1/4"` screws through the spacers and into the wood blocks.
Drive the `#6 1 1/4"` screws through the spacers and into the wood blocks.
![Screen mounted with spacers](img/manual/Screen_mounted_with_spacers.jpg)
@ -190,7 +190,7 @@ Find a good position for the power and gamepad wires, and drill two `1/2"` screw
![Wire positioning screws](img/manual/Wire_screws.jpg)
Cut two long strips of gasket tape for the backing of the power and gamepad cables. Cut four shorter strips to tape the wires to the backing gasket.
Cut two long strips of gasket tape for protecting the power and gamepad cables. Cut four shorter strips to tape the wires to the backing gasket.
![Wire gasket back](img/manual/Wire_gasket_back.jpg)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB