Code worked fine until i added “lcd.begin(wire)”, then the code would stop at that point. Comment out the “lcd.begin(Wire)” and the code runs fine. Created a test sketch that shows what’s happening, but for some reason i cannot attach it.
Is there an issue with both lcd and rtc libraries trying to use the wire and/or spi libraries ???
Does your code not compile, or just not function correctly when lcd.begin(Wire); is included? There shouldn’t be any issues with multiple libraries accessing SPI and I2C as they should take turns doing it. That being said, I don’t think we’ve ever tested these two libraries together at the same time so there is a possibility there’s a conflict somewhere.
The code compiles fine, but it never exits setup(). When i comment out lcd.begin(Wire); , it goes through setup() and enters loop(). No problems with code compiling if i leave lcd.begin(Wire); commented out.
mLamb:
The code compiles fine, but it never exits setup(). When i comment out lcd.begin(Wire); , it goes through setup() and enters loop(). No problems with code compiling running if i leave lcd.begin(Wire); commented out.
I decided to run with the Software Serial library for the serLCD,(with no issues) so I no longer have the original sketch,
but the code I’ve included is all that’s needed to see that the SparkFunDS3234RTC library and the serLCD library don’t play well together.
Run this code and only the first two lines will print to the Serial monitor.
#include <SerLCD.h>
#include <SPI.h>
#include <SparkFunDS3234RTC.h>
#include <Wire.h>
SerLCD lcd;
void setup() {
Serial.begin(9600);
Serial.println("beginning of setup()");
Wire.begin();
Serial.println("after Wire.begin()");
lcd.begin(Wire); //comment this out and all three lines will be printed to the Serial monitor
Serial.println("after lcd.begin(Wire)");
}
void loop() {
// put your main code here, to run repeatedly:
}
I just tried your code on an Uno and it’s working OK here. Maybe you have an older version of one or more libraries? The only thing I can think of would be to uninstall and reinstall the latest versions and see if that clears this up.