I have an old USB Gamepad from Enter.(Model: E-GPV). As I no longer use it, I am trying to re-purpose the Analog sticks to use with my Arduino uno. I think it's got two pots and one switch (for when you press the stick down). Not sure.
Has anyone tried this before? Is it possible to use these sticks as analog input for the Arduino? Do I need any other components to wire this up? Maybe a library?
I have attached the pictures of the Gamepad. Any help will be appreciated.
Draw out the schematic from the board, so you know which pins are supposed to be supply and ground.
You have 8 wires:
Vcc
Gnd
Stick 1 X axis
Stick 2 X axis
Stick 1 Y axis
Stick 2 Y axis
Stick 1 button
Stick 2 button
Vcc and Gnd will each go to opposite sides of each of the pots, and the middle wire is the one you measure.
Gnd also goes to one side of each button, while the other side of the button is the one you connect to.
In any event, there's no library needed - unsolder that little stick board (I'd try to keep the ribbon cable on the board, and intact) - put +5v on Vcc, Gnd to Gnd, and read the pots with analogRead(). Set the button pins' pinMode() to INPUT_PULLUP and treat like any other button.
Cute little board - really doesn't get much easier than that to make use of - it doesn't look like they did any of the obnoxious cost-cutting tricks you sometimes see.
Library? Just need 4 simple analogRead(), 2 for each pot. and 2 digitalRead, or a PCINT, for the button.
Find the ends of each pot, wire to +5 & Gnd, wiper to an analog input.
Wire the switch to a digital input & Gnd, use the INPUT_PULLUP feature so the pin is high unless thee button is pushed.
I just needed the X and Y axis for the sticks. Guess it is easy to wire it up to an Arduino.
Does it matter as to which end of the pot, I attach 5V and GND to?