Adafruit LC709203F and Arduino MKR ZERO

I can’t get the above working together. With a basic program which runs lc.begin(), I found the begin() never returned if the battery monitor was connected. It does return if it is disconnected. I have used D11 and D12 for the comms and double checked they are round the right way. I took the return parameter and sent a message as below. (I deleted some line feeds to shorten it, and it’s missing the indents from the original but otherwise it’s the code I used) I get the ‘Not Found’ messages but never the ‘Found’.
Does it work with a MKR ZERO or other SAMD21 boards?

#include “Adafruit_LC709203F.h”
Adafruit_LC709203F lc;
bool FoundIt;

void setup() {
Serial.println("\nAdafruit LC709203F demo");
FoundIt = lc.begin();
if (FoundIt) { Serial.println(“Found LC709203F”); }
else { Serial.println(“Not Found LC709203F”); }

void loop() {
if (FoundIt) { Serial.println(“Found LC709203F”); }
else { Serial.println(“Not Found LC709203F”); }

I can’t see why it wouldn’t run on the MKR ZERO. Have you followed everything in Adafruit’s setting up guide, including plugging in a battery?

Try running the basic I2C scanner example to make sure you can detect the breakout.

Good idea, thanks. When I leave the board disconnected, the scanner sees nothing. When I plug it in the Arduino freezes until I unplug it. See the debug text below. I added the lines in brackets. Dead board?

Wiring: red to VCC, yellow to SCL, blue to SDA, black to GND.
3.299v across red/black (where red is positive). About 10Mohms between SDA and SCL with the board fitted.

16:37:01.439 -> Scanning…
(plugged in the device, no further reply, green LED went off as it started scanning)

(unplugged the device)
16:37:29.784 -> No I2C devices found
16:37:29.784 ->
16:37:34.775 -> Scanning…
16:37:34.775 -> No I2C devices found
16:37:34.775 ->
16:37:39.765 -> Scanning…
16:37:39.765 -> No I2C devices found
16:37:39.765 ->
16:37:44.776 -> Scanning…
(plugged in, green LED came on, LED went out as it started scanning)

(unplugged the device)
16:38:20.268 -> No I2C devices found
16:38:20.268 ->
16:38:25.241 -> Scanning…
16:38:25.274 -> No I2C devices found
16:38:25.274 ->

VCC is +3V3, SCL is D12, SDA is D11. I’d take a photo but it’s a bit cluttered; I have some LEDs on D0 to D5 with 180 ohm resistors; that’s all else that’s fitted. There is no shorting on the pins I’ve used.

The Arduino freezing until you unplug the breakout is a bad sign. Do you have any other I2C breakouts to test with it? I’d imagine the problem is with the LC7 but it’s good to be sure.

What sort of battery are you using wiht the LC7, and how certain are you that the polarity is right?

The battery monitor is cheap so I’ve ordered another and will try it wire-stuffed into the Arduino on its own.

Success - I wired the board from the PCB holes to the Arduino on its own and the code runs. Something wrong with the way I wired the QT cable I was using.