sleemanj / DS3231_Simple

An Arduino Library for EASY communication with DS3231 I2C RTC Clock and Atmel AT24C32 I2C EEPROM commonly found on the same board. Implements setting, getting the time/date, setting, checking and clearing alarms, and dead-easy circular-buffered logging of data with timestamp.
MIT License
82 stars 25 forks source link

Ds3231 HelloWorld example not properly working #27

Closed Fusionlight13 closed 11 months ago

Fusionlight13 commented 11 months ago

I just imported this library for the first time and started the basic HelloWorld script. When I run it and answer the first two prompts, I get two more prompts consecutively. I try to answer them all separately but the loop just goes back to the first day of month input.

sleemanj commented 11 months ago

Ensure you are entering in exactly the format specified by the prompt (ie, for day enter 09 not 9). Set line ending to Newline

Code for the prompts is here: https://github.com/sleemanj/DS3231_Simple/blob/975662b34fed8b081bf1bd805bfd4081992864cb/DS3231_Simple.cpp#L743

Fusionlight13 commented 11 months ago

Unfortunately I could not get it to work. I padded the numbers and made sure I put it in correctly several times but still It skips input. The baud rate is right and its set to newline. Tried installing it a second time but the results are the same.

sleemanj commented 11 months ago

I would suggest you may actually have a hardware issue which is causing a reset.

After the Serial.begin line, add

Serial.println("Starting Up...");
Fusionlight13 commented 11 months ago

I ran the SetDateTime sketch and it seems to work fine. It's remembering it when I restart it with the clock. write() line deleted. It's very strange. I guess I just have to set it manually without the Clock.promptForTimeAndDate() method.