Can I make two redboards communicate with sparkfun explorers and xbees with qwiic?

I have:

  • two redboard esp32s,
  • xbee two explorers usbc,
  • and two xbees.
    There is a qwiic connecter on each explorer that Im using to connect to the respective redboard esp32s. These explorers don’t have a qwiic library in arduinoIDE, im assuming they are a master and not a slave or something like that.

Is it possible to communicate between two boards with this setup? I have found zero code to do this online. I know the alternative is using serial, but I dont want to solder the pins on the explorer if I can use the qwiic connecter instead. PLZ HELP :frowning:

Yes, you can do it either way:

reboard → explorer → xbee : xbee ← explorer ← redboard
xbee → explorer → redboard : redboard ← explorer ← xbee

The main thing is to program either the redboard or the xbees to pass their info over i2c to the other…it just depends on whether you want the xbee to interface with one another or the redboards to (over bt/wifi)

THANK YOU, do you know what library it is to talk over the qwiic with i2c? Are the pins on the qwiic connecters just digital pins i can access with wire.h? I plan on putting some example code in here in case someone after me wants.
EDIT: How would I know the explorers i2c address to connect to it also?

Don’t know if this works on esp32 but it’s worth a try.

https://docs.arduino.cc/learn/communication/wire/

https://www.arduino.cc/en/Tutorial/LibraryExamples/MasterWriter

Yes - the qwiic connector is the 4-wire i2c bus, which are 3.3v, GND, SDA and SCL

Yes, you call the SDA and SCL via the standard wire.h :slight_smile:

For point-to-point ‘wireless cable,’ I’ve had superb results with the Xbees with 802.15.4 FW. I make coord/node pairs in XCTU and, if they’re in range, they just work. I’ve used SFE serial explorers for interface and power supply and they’re completely transparent to the RS232 devices, just like they’re wired to each other.

1 Like