I have the Qwiic Joystick (COM-15168) and Qwiic Twist (DEV-15083) and want to use them at the same time.
I’m using the Qwiic Joystick library version 1.0.4 and the Qwiic Twist library version 1.0.2. When I include both in the same sketch:
#include <SparkFun_Qwiic_Twist_Arduino_Library.h>
#include <SparkFun_Qwiic_Joystick_Arduino_Library.h>
I’m getting the error:
In file included from /Users/ppelleti/Documents/Arduino/SDMatrixPicture/SDMatrixPicture.ino:6:0:
/Users/ppelleti/Documents/Arduino/libraries/SparkFun_Qwiic_Joystick_Arduino_Library/src/SparkFun_Qwiic_Joystick_Arduino_Library.h:34:6: error: multiple definition of 'enum encoderRegisters'
enum encoderRegisters {
^
In file included from /Users/ppelleti/Documents/Arduino/SDMatrixPicture/SDMatrixPicture.ino:5:0:
/Users/ppelleti/Documents/Arduino/libraries/SparkFun_Qwiic_Twist_Arduino_Library/src/SparkFun_Qwiic_Twist_Arduino_Library.h:40:6: note: previous definition here
enum encoderRegisters {
^
Is there any way to use both of these libraries in the same sketch? Thanks!