Var long tc - write into EEPROM
masselon
Posts: 51
I am traying to, based in the 05_jm-ds3231_demo and 06_jm_at24c32_demo, make a temperature datalogging for a window of time (for 15 minutes with sample time of 30 secunds, e.g.) however I am with the follow doubt: How do I do to put tc (rtc.temp_c) into eeprom and setup a range of logging time?} Thanks in advance.
Comments
It would be best to use the rtc to synchronize your when you want to write. Start by reading the seconds register, then test it with something like this:
In the log_temp() method you'll need to read the temperature, the write it to the EE as a long using an index -- for example:
The index variable, tidx, can be monitored for your until it hits 2x your desired time (given you're storing everything 30s)
This should be enough to get you going.