Send data from one device to another via Qwiic?

I am trying to send data from an Redboard with a weather shield to a SamdRFPro with a Qwiic cable. I can’t get Serial message to show up in the Serial Monitor.

I tried the code found at https://www.arduino.cc/en/Tutorial/MasterWriter

On the Samd21 Pro RF:

// Wire Master Writer
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Writes data to an I2C/TWI slave device
// Refer to the "Wire Slave Receiver" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup() {
  Wire.begin(); // join i2c bus (address optional for master)
}

byte x = 0;

void loop() {
  Wire.beginTransmission(8); // transmit to device #8
  Wire.write("x is ");        // sends five bytes
  Wire.write(x);              // sends one byte
  Wire.endTransmission();    // stop transmitting

  x++;
  delay(500);
}

On the Redboard:

// Wire Slave Receiver
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Receives data as an I2C/TWI slave device
// Refer to the "Wire Master Writer" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup() {
  Wire.begin(8);                // join i2c bus with address #8
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output
}

void loop() {
  delay(100);
}

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany) {
  while (1 < Wire.available()) { // loop through all but the last
    char c = Wire.read(); // receive byte as a character
    Serial.print(c);         // print the character
  }
  int x = Wire.read();    // receive byte as an integer
  Serial.println(x);         // print the integer
}

Hi partsoven,

Hmm, those examples on a Pro RF and RedBoard work just fine for me. Have you verified the Qwiic cable you are using to connect the two boards is working properly? Are you connecting with a standard Qwiic cable or are you using a breadboard jumper like [this?](Qwiic Cable - Breadboard Jumper (4-pin) - PRT-14425 - SparkFun Electronics)

I am using regular Qwiic cables direct from Sparkfun. Then again I can’t seem to get anything to work with Qwiic. I wonder if my Qwiic cables are no good…

If the issue follows the cable(s), then it is most likely the issue. What other Qwiic devices do you have that are not working? Are you using a Qwiic Shield? If possible, try connecting a Qwiic device that is not working through the pins broken out on the board and not the Qwiic connector. That would help identify if the issue is with the cables/connector or something else is going on. Also, if you can take a few photos of a circuit that is not working, that would be helpful for troubleshooting.