Skip to content
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.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Firmware updating to firmware 2.04, adding fuse bits Feb 21, 2019
Hardware panel Jan 9, 2019
.gitignore
LICENSE.md
README.md

README.md

SparkFun Qwiic Joystick

SparkFun Qwiic Joystick

SparkFun Qwiic Joystick (COM-15168)

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

I2C Registers


Address Contents
0x00 Default I2C Address
0x01-0x02 Firmware Version
0x03-0x04 Horizontal Position (MSB First)
0x05-0x06 Vertical Position (MSB First)
0x07 Button Position
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.

Repository Contents

  • /Firmware - Firmware for ATtiny85 and Python Example Code
  • /Hardware - Eagle design files (.brd, .sch)

Documentation

  • Library - Arduino library for the Qwiic Joystick.
  • Hookup Guide - Basic hookup guide for the Qwiic Joystick.

Product Versions

  • COM-15168- Retail packaging of standard description here

Version History

License Information

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 techsupport@sparkfun.com.

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.
You can’t perform that action at this time.