issue with SparkFun_Qwiic_Relay.h library

Hello - I am new to the Qwiic system. I am trying to connect the Qwiic Quad Relay to a RedBoard that I purchased and getting an error when loading the SparkFun_Qwiic_Relay.h library into my script, even with no other code that calls it. The issue appears to be that there are multiple functions in the Wire.h library and the SparkFun_Qwiic_Relay.h library does not know which to call.

Has anyone experienced this and is there a simple solution to this? I am running on a Windows 11 machine with Arduino IDE 2.0.3.

In file included from [User]\Arduino\libraries\SparkFun_Qwiic_Relay_Arduino_Library\src\SparkFun_Qwiic_Relay.h:4:0,
                 from [User]\Arduino\libraries\SparkFun_Qwiic_Relay_Arduino_Library\src\SparkFun_Qwiic_Relay.cpp:12:
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h: In member function 'uint8_t Qwiic_Relay::_readCommand(uint8_t)':
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
     uint8_t requestFrom(int, int);
             ^~~~~~~~~~~
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
     uint8_t requestFrom(uint8_t, uint8_t);
             ^~~~~~~~~~~
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h: In member function 'float Qwiic_Relay::_readVersion(uint8_t)':
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
     uint8_t requestFrom(int, int);
             ^~~~~~~~~~~
[User]\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
     uint8_t requestFrom(uint8_t, uint8_t);

The library uses TwoWire instead of wire; this section of our hookup guide has the functions listed https://learn.sparkfun.com/tutorials/qw … no-library - but you might go back a few steps and ensure your hookup matches too :wink:

it is just type-casting. The compiler does not know which function to use. 2 changes in the file

[User]\Arduino\libraries\SparkFun_Qwiic_Relay_Arduino_Library\src\SparkFun_Qwiic_Relay.cpp

change line 340

from

_i2cPort->requestFrom(_address, 1);

to

_i2cPort->requestFrom(_address,(uint8_t) 1);

change line 353

from

_i2cPort->requestFrom(_address, 2);

to

_i2cPort->requestFrom(_address,(uint8_t) 2);