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.
Leap year calculation appears incomplete, for example 2100 will not be a leap year but your code would include it I think.
"dim" and "a_dim" are not very descriptive names
I'm not sure about dim[i] unless this is a new feature of GCC handling it automatically, since a_dim is in PROGMEM the program memory reading functions (pgm_read_byte specifically) need to be used, without retrieving the data in this manner you are just grabbing random junk from a ram location, not the flash location.
Thank you for the PR.
Leap year calculation appears incomplete, for example 2100 will not be a leap year but your code would include it I think.
"dim" and "a_dim" are not very descriptive names
I'm not sure about
dim[i]
unless this is a new feature of GCC handling it automatically, since a_dim is in PROGMEM the program memory reading functions (pgm_read_byte
specifically) need to be used, without retrieving the data in this manner you are just grabbing random junk from a ram location, not the flash location.