Teensy Game Controller

Status
Not open for further replies.

raaco

New member
I am currently working on a project and interested in using the teensy to create a game controller for disabled gamers. i was wondering if the teensy be used to create a game controller similar to an xbox controller for pc (including all the buttons, analogs, ect). if so how can i program the separate analog thumb sticks so that one controls looking and one control's movement. and hwo can i program the bottons ( a link to an existing project would also help). the analog sticks are the most important part of my inquiry. Thanks in advance.
 
You should probably start with the Joystick example. In Arduino, open it with File > Examples > Teensy > USB_Joystick > Complete.

It already has code using analogRead(). For the joystick part you mentioned in 2 threads earlier today

http://forum.pjrc.com/threads/23592-Analog-Thumb-Joysticks-Teensy
http://forum.pjrc.com/threads/23591-Analog-Thumb-Joysticks-Teensy

just connect the pot for each axis to an analog pin.

Each pot as 3 wires. Connect the center wire to the analog input pin. Connect the other 2 wires to GND (AGND if using Teensy 3.0) and 5V (if using Teensy 2.0) or 3.3V (if using Teensy 3.0). If you use a voltmeter, you can see the voltage change on the middle pin as the joystick moves. Likewise, analogRead() will measure the voltage and give you a number.

Start with that joystick example and get it working with your PC, then modify to suit your needs.
 
Thanks Paul. your reply and time has been very helpful. you probably noticed that i'm a noob with all this, but i am willing to learn.
 
The teensy is not visible, so I didn't take a picture, but it's this controller with a USB connector instead of the game port connector.

6466576_4_644x461_joystick-genius-maxfighter-f16-electronice-si-electrocasnice.jpg
like:
Genius_F-16U.jpg
but with several extra features.
 
Status
Not open for further replies.
Back
Top