Introduction: Tiny USB Joystick
This instuctables show how to make a very simple tiny USB joystick.
This instructables is related to Hall Effect USB Joystick for providing a low cost solution.
Step 1: Preparation
Joystick
A 2-axis joystick breakout module
Digispark Dev Board
This is a tiny dev board that can emulate USB HID device, e.g. USB Keyboard, mouse or joystick
Others
A tiny breadboard, some breadboard wires and some pin headers
Step 2: Pin Header Preparation
Soldering pin headers to the board if not yet.
CAUTION Before Plug Into Breadboard
Digispark dev board power pins are not breadboard friendly!
This project only require 5V and GND pins, It is required bent the 5V pin a little bin outside, so it is not connect in the same row while plug into breadboard. Or you will Blow Something Out.
Step 3: Assembly
The pin placement for both board are unbalance, it need further pins to support the corners that does not have pin header.
Here are the connection summary:
Digispark -> Joystick GND -> GND 5V -> 5V P2 -> VRx P5 -> VRy P0 -> SW
Note:
- SW trigger by press down the joystick
- P3 and P4 is connected to USB, so any USB HID project cannot connect other things to these 2 pins
- P2 still available for something else, e.g. a signal LED or an extra button
- It is required analog input pins to read VRx and VRy value, Digispark P2 and P5 are the analog input pins. Some board may not enabled P5 (efuse RSTDISBL bit). You may test it by Arduino "blink" example on pin 5. You are required to re-burn the Bootloader or simply change the efuse to enable it. More details: https://www.instructables.com/id/Digispark-DIY-Th...
Step 4: Program
Setup Arduino with Digispark support if not yet:
http://digistump.com/wiki/digispark
Download and program the source code:
Step 5: Enjoy!
Now you have a tiny device to help you operate with 2-axis analog value.
6 Comments
9 months ago
2 years ago on Step 4
The code you shared doesn't actually read the joystick, it just moves one X programmatically.. same code as the example from the library..
Reply 2 years ago
The digispark have 2 pins can read analog signal, P2 and P5. However, some clone board keep P5 as reset pin and not yet enable P5 as a I/O pin in efuse. You may test the blink program on P5 to test is it can blink first.
Reply 2 years ago
But the .ino file in the github is literally just the example code that comes with the joystick library. It even says "// scroll X left to right repeatedly".
Reply 2 years ago
Thanks for telling me that, I just commit the code again ;P
Reply 2 years ago
Nice, thanks for updating it after such a long time haha :D