The images below illustrate the wiring for a joystick that I purchased from eBay. Here are notes corresponding to the diagram:
- The circuit board for the Joystick has the button wired from ground so the signal would go from high to low. I wanted a rising signal so broke the default connection (as shown by the picture) and wired the button to the 5v supply.
- The output from the button is connected to a pull down resistor...
- ...and since the output 5v I route it through a voltage divider to make it safe for the Raspberry Pi.
- Each axis of the Joystick delivers a voltage that indicates the position of the controller. These outputs are connected to the Analog Digital Convertor (ADC) using channels 2 and 3.
- The output from the ADC is connected to the Raspberry Pi using the SLC and SDA connections.
I will talk to the software side of the above in another post.
No comments:
Post a Comment