SparkFun Qwiic Joystick
Now, you can easily add an HID/controller to your project! The SparkFun Qwiic Joystick combines the convenience of the Qwiic connection system and an analog joystick that feels reminiscent of the thumbstick from a PlayStation 2 controller.
Thanks to an ATtiny85 on the Qwiic Joystick, all the necessary bits are taken care of and your microcontroller only needs to look for your inputs in the registers of the I2C device.
Factory Default I2C Slave Address: 0x20
|0x00||Default I2C Address|
|0x03-0x04||Horizontal Position (MSB First)|
|0x05-0x06||Vertical Position (MSB First)|
|0x08||Button Status: Indicates if button was pressed since last read of button state. Clears after read.|
|0x09||Lock Register for I2C Address Change|
|0x0A||Current I2C Slave Address. Can only be changed once Lock Register is set to 0x13, then it clears the Lock Register.|
In the registers for the joystick position, the MSB contains the first 8 bits of the 10-bit ADC value and the LSB contains the last two bits. As an example, this is how the library converts the two registers back to a 10-bit value.
uint_16t full10bitvalue = (MSB | LSB)>>6;
You could potentially only look at the MSB and get an 8-bit (256 position) reading. The firmware was intentionally written this way in the hopes that it would be useful for customers who don't need the full resolution of the joystick position.
- /Firmware - Firmware for ATtiny85 and Python Example Code
- /Hardware - Eagle design files (.brd, .sch)
- Library - Arduino library for the Qwiic Joystick.
- Hookup Guide - Basic hookup guide for the Qwiic Joystick.
- COM-15168- Retail packaging of standard description here
- SparkFun Qwiic Joystick COM-15168 - Firmware was update so that the board acts like a normal I2C slave device, the silk screen was changed to follow retail product guidelines, and the ISP pins were reconfigured for programming on a test bed.
- SparkX Qwiic Joystiic v1.1 SPX-14656 - Version 1.1 is a minor revision which adds a power LED and corrects the wide IC footprint. It's functionally identical to the previous version.
- SparkX Qwiic Joystiic SPX-14619 - Original SparkX Joystiic.
This product is open source!
Please review the LICENSE.md file for license information.
If you have any questions or concerns on licensing, please contact firstname.lastname@example.org.
Distributed as-is; no warranty is given.
- Your friends at SparkFun.