Qwiic Buzzer not working with Thing Plus

Quick follow up. Turns out the root problem is that the NORA-B306 just can’t handle clock stretching properly, see here. So when it attempts to read the device ID (or any other register, I think), it gets off by 1 bit.

@harberbarber A workaround I found for this is to decrease the I2C clock speed down to 10kHz before calling begin() so the clock stretching gets hidden. Should be safe to increase the clock speed again right after that. Example:

Wire.begin();
Wire.setClock(10000); // Temporary drop to 10kHz

if (buzzer.begin() == false) {
  Serial.println("Begin: FAIL!");
}
else {
  Serial.println("Begin: SUCCESS!");
}

Wire.setClock(100000); // Reset to 100kHz

@TS-Russell If we see other users having issues using Qwiic devices with the Thing Plus NORA, it’s possibly a clock stretching issue. I expect this would only apply to Qwiic devices that use an ATtiny for the I2C interface, like the Qwiic Buzzer; true I2C devices shouldn’t have this problem.

Hope this helps!

2 Likes

Thanks for following up, I can give this a test Thursday!

1 Like

This worked! Thank you for looking into this. Glad to see the root problem – thought I was going insane!

2 Likes