165.165 error with grove RTC 1.2 and LCD Display using a wifi-nodem esp8266

Hi there I'm a newbie noob at arduino and I'm currently using a Nodemcu from robotdyn, trying to make it function with a grove rtc v1.2 and i2c lcd display but all I'm getting is an error from both the time 165:165:85 & date 165/165/2165 shown on the lcd display.
I had tried looking up on it but the other solutions don't work and the battery I have is a Lithium 1220 3V note that where I'm from does not sell 1225 v3 batteries o the shop that sold me the rtc sold me a 1220 instead.

The set up is as follows

Nodemcu D1 == SCL (both lcd & rtc)
D2== SDA (both lcd & rtc)
GRD==GRD (both lcd & rtc)
3.3V == VCC (both lcd & rtc)

Any help is appreciated. Thanks in advance

P.S. I'm only testing right now but my main purpose is to only show the time on the 1st row of the lcd and a fixed message on the 2nd row

  • use an i2c scanner sketch.
  • test the RTC without the LCD first.
  • the LCD is a 5 V device

The scanner results are lcd - 0x27 & rtc 0 x 68

Tested without the lcd still same results

The nodemcu only has 3.3v if there is anyway to make it 5v please do tell thank you

I have no experience with RTC module, but a simple question: did you set the time?

the LCD is a Grove module too? If the LCD works, let it on 3.3 V. (You could use the Vin pin as 5 V source.)

Juraj:
I have no experience with RTC module, but a simple question: did you set the time?

the LCD is a Grove module too? If the LCD works, let it on 3.3 V. (You could use the Vin pin as 5 V source.)

Yes this was the code I used,

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>

#if defined(ARDUINO) && ARDUINO >= 100
#define printByte(args) write(args);
#else
#define printByte(args) print(args,BYTE);
#endif

uint8_t clock[8] = {0x0,0xe,0x15,0x17,0x11,0xe,0x0};

RTC_DS1307 RTC;
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
lcd.begin(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
lcd.print(“Initialising…”);
lcd.createChar(2, clock);
Wire.begin();
RTC.begin();

// following line sets the RTC to the date & time this sketch was compiled
//RTC.adjust(DateTime(DATE, TIME));
}

void loop()
{
lcd.clear();
DateTime now = RTC.now();
lcd.printByte(2);
lcd.print(" ");
lcd.print(now.hour(), DEC);
lcd.print(’:’);
lcd.print(now.minute(), DEC);
lcd.print(’:’);
lcd.print(now.second(), DEC);
lcd.setCursor(0, 1);
lcd.print(now.day(), DEC);
lcd.print(’/’);
lcd.print(now.month(), DEC);
lcd.print(’/’);
lcd.print(now.year(), DEC);
lcd.print(’ ');
delay(1000);
}

No the LCD is not a grove module. Won’t the vin pin be too dangerous to use?

Also my bad I’m currently using a wifi-nodem esp8266 from robotdyn not a nodemcu