Hello guys!
I'm new in programming and I'm working in a garden automation project. I irrigate automatically my garden twice a day in specifics times (morning: 06:00 am to 07:00 am and evening 05:00 pm to 06:00 pm ) depending on the soil moisture and I show in a LCD screen if it has irrigated or not. My problem is that every time that I reset the Arduino or if the energy interrupts, my LCD will show that it didn't irrigate.
I have a micro SD card that stores all the information that I need in a .txt file separate by commas ",". I'm wondering if is possible to read the information of the day (doesn't need to check all the data in the SD card) and check if it has irrigated or not. This needs to be done just once when the arduino starts. An example of how I store my data is:
day(dd/mm/yyyy), time(0 - 24), temperature (ºC), air humidity (%), soil moisture (raw data: 0-1023), luminosity (lux), irrigation in the morning(Yes or empty), irrigation in the evening(Yes or empty), irrigation manually (Yes or empty)
03/03/2017,07:05,19,88,512,775.74, yes, ,
03/03/2017,14:26,21,90,528,775.74, , ,
03/03/2017,17:16,23,75,472,162.24, ,yes ,
So basically, I just need to check the 1st, 7th, 8th and 9th column of the current day. Any suggestions or ideas? My code has almost 400 lines but if is necessary I can post here.
Thanks guys!