I tried to set time on a RTC DS3231. After Uploading it with Arduino IDE, I try viewing the output in the Serial Monitor. However, if I start viewing the Serial Monitor, It starts showing encrypted lines. I have tried the example code and yet it shows the same error.
The Setup Code:
#include <DS3231.h>
DS3231 rtc(SDA, SCL);
void setup()
{
Serial.begin(115200);
rtc.begin();
rtc.setDOW(SUNDAY);
rtc.setTime(02, 17, 0);
rtc.setDate(29, 03, 2020);
}
And the loop code looks like this
void loop()
{
Serial.print(rtc.getDOWStr());
Serial.print(" ");
Serial.print(rtc.getDateStr());
Serial.print(" -- ");
Serial.println(rtc.getTimeStr());
delay (1000);
}
The Screenshot of the Output:
