With provided code (complete of source) and schematics of the Joystick BitPack™ your ORbit16™ becomes a fully functional Joystick/Gamepad with following features:
- Is recognized by pc as a common HID Joystick
- Additional UART data input/output (57600,n,8,1) for use the joystick with your robot!
- 2 analog axis
- 8 pushbuttons
- reset button
- led
- how to enable pullup resistors on digital inputs (CNx pins)
- how to read 2 analog inputs and make the average on 8 readings
- how to translate analog reading (0-1023) to values 0-255 required by joystick
- how to mix HID USB code with UART
Bill of Material
- 1x thumb joystick (you can buy it from Sparkfun or Robot-Italy)
- 4x tactile switch 12x12mm (you can buy them from Sparkfun or Robot-Italy)
- 4x tactile switch 6x6mm
- 1x led 3mm
- 2x 20-pin male header
- 1x 330Ω resistor ¼W
- 1x 560Ω resistor ¼W
- optional 4-pin male header or 4-pin polarized connector for UART connection (Sparkfun or Robot-Italy)
How does it works
X:127 Y:127 B:128
Following video shows how does Joystick BitPack™ works
On the top is a software used for joystick testing, on the bottom is HyperTerminal.
Download
Download includes PDFs of the board, source code with MPLAB project and compiled HEX. Code for PIC24FJ64GB002. Joystick BitPack™ to be mounted as shown in the photo above.
Joystick Demo (139 downloads)