SparkFun Qwiic Single Relay

First time poster here.

I’ve got two Qwiic connected single relays. I’ve got them connected to a Pi 3B+ via a Qwiic bus hat. I’m programming in Python (3.8). I’ve installed the pip libraries for sparkfun-qwiic and sparkfun-qwiic-i2c. I can switch both relays on and off.

In the documentation for the device, it indicates I should be able to software set the address of the relays (at the moment they are both on 0x18). However, in qwiic_relay there does not seem to be a function to do this (there are functions in the Arduino version).

Is there a way to do this? Which library should I be looking in?


Hi Alexander,

I started by checking the GitHubs for both libraries:

It shouldn’t be too hard to port that over, as it just looks like a regular I2C write command in the C++ library, you’ll need to go looking in the .h file for the ADDRESS_LOCATION parameter I believe.


Let us know how you go!

Okay. I'll take a look at that thanks.

1 Like