26#ifndef _SPARKFUN_QWIIC_JOYSTICK_ARDUINO_LIBRARY_H
27#define _SPARKFUN_QWIIC_JOYSTICK_ARDUINO_LIBRARY_H
31#define QWIIC_JOYSTICK_ADDR 0x20
34enum joystickRegisters {
45 JOYSTICK_CHANGE_ADDRESS,
52 boolean begin(
TwoWire &wirePort = Wire, uint8_t deviceAddress = QWIIC_JOYSTICK_ADDR);
53 boolean isConnected();
55 uint16_t getHorizontal();
56 uint16_t getVertical();
63 boolean setI2CAddress(uint8_t newAddress);
67 uint8_t _deviceAddress;
69 uint8_t readRegister(uint8_t addr);
71 boolean writeRegister(uint8_t addr, uint8_t val);
Wire interface class.
Definition Wire.h:43