RTC SD2405 I2C and LCD1602 RGB :The RTC library interferes with the operation of the LCD module.
Hello.
I have a strange phenomenon concerning I2C bus modules.
(
Modules: RTC SD2405 I2C and LCD1602 RGB
I'm trying to display text on an LCD. It works fine until I use the RTC module. Then it starts endlessly displaying the last letter of the text.
(Everything from one company DFRobot , i belive it should work together)
The simplified code looks like this:
#include "GravityRtc.h"
#include "Wire.h"
#include "DFRobot_RGBLCD1602.h"
GravityRtc rtc; // Init RTC
DFRobot_RGBLCD1602 lcd(/*RGBAddr*/0x2D ,/*lcdCols*/16,/*lcdRows*/2); //16 characters and 2 lines of show
void setup() {
Serial.begin(9600);
rtc.setup();
lcd.init();
lcd.setRGB(111,254,244);
lcd.print("Texting");
}
void loop() {
rtc.read();
Serial.print(" Hour = "); // godzina
Serial.print(rtc.hour);
Serial.print(" Minute = "); // minuta
Serial.print(rtc.minute);
Serial.print(" Second = "); // sekunda
Serial.println(rtc.second);
}
But if I disconect modul of RTC , its the same.
It looks like there is indeed a software problem.
it endlessly displaying the last letter of the text too.
Maybe problem in library from DTRobot ?
If I comment this line :
//rtc.read();
LCD start work properly. (RTC of course not.)
The RTC library interferes with the operation of the LCD module.
But I use libraries from DFRobot …
Connections as in the picture:
Thank you for any help.