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.begin(115200);
delay(10);
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”); }
delay(2000);
}
1 post - 1 participant