Hi,
I’m newly work on arduino & inteface RTC DS1307 (date & time) data write on eeprom 24LC512. Now date and time already displayed on serial monitor but I want to display date & time on eeprom. so please help me to solve this my problem. I attached code with this so please help me.
float value = analogRead(tempPin); //read sensor value
float temp = value * 0.48828125;
EEPROM.write(address, temp); //write value to current address counter address
EEPROM.write() writes a byte to the EEPROM address specified. Is your temp value a byte ? Answer, no.
I am not sure what you want to do with the data on the EEPROM but until you write it correctly you will not be able to read it back.
Look at the EEPROM.put() function which will enable you to write a float if you really need to.
You should also take note that the EEPROM has a limited number of write cycles which is easy to exceed.
I'm working on a similar project. A chicken egg incubator. I'm using Uno + Ds3231 rtc. I'm having a hard time figuring out how I can store a future date (18 days later) to the Eeprom and then just let a buzzer / light go off. I need to also tilt the tilt trays every 2 hours.
If your interest is actually an event 18 days hence, rather than the data, and you just want to tilt the trays at two hour intervals, the RTC is almost certainly, and the eeprom most certainly, redundant.
Nick_Pyner:
If your interest is actually an event 18 days hence, rather than the data, and you just want to tilt the trays at two hour intervals, the RTC is almost certainly, and the eeprom most certainly, redundant.