Recently, I have been working on a automated gardening/data logging project. I am using a 12 volt pump and relay connected to a arduino mega to water the garden. To log data, I have 3 moisture sensors, a dht11, a photoresistor, a rtc module (DS3231), and an sd card shield. I also have one through hole status neopixel. I would like my arduino to log data to the sd card every hour and turn on the relay for the pump when the average soil reading is above the threshold I have set. My neopixel displays a color based on what task the arduino is performing. I have just recently gotten back into using my arduino and programming. Will my code work as planned? Any suggestions?
Garduino_Datalogger.ino (6.61 KB)