I can't figure out how to program this part of code:
My setup consists of an Arduino mega, temperature sensor, RTC and sd card slot. I have RTC, SD card, and temperature sensors all working just fine, but now can't figure out how to program it so it logs data automatically for a specific time period(let's say 30 minutes) after the temperature reaches specified value? It has to check the same temperature condition after that time period and if it no longer meets requirements it stops the data logging process, and if does meet this condition it records data for 30 more minutes.
I think this should be quite simple, but as a beginner with this being my first Arduino project and no experience in programming I am really struggling here.
Any help or tips will be highly appreciated.