Need help programming an Adruino to function as a solar differential controller
Hi I need help to write a program for an Arduino to allow it to function as a Solar Differential Controller (SDC). An SDC simultaneously reads the temperature of two different elements,1) the water inside the thermal storage tank and 2) the inside of the solar collector. When the sun rises in the morning it begins to heat up the inside of the collector. When the SDC senses that the collector is a few degrees warmer than the storage tank it signals a circulation pump to turn on to circulate water from the tank, through the collectors and back to the tank. When the sun starts to set in the evening and the collector cools to within a few degrees of the storage tank, it signals the pump to shut off.
So basicly I need the Arduino mega 2560 to read the temperature from two DS18B20 digital temperature probes. When one of the probes shows a reading 5oC higher than the other, the Arduino changes an output to high. When the higher probe's reading drops to within 5oC of the lower one, the Arduino changes the output back to low.
I don't even know where to start really, this programming is way over my head. Any help would be appreciated. This program is for a large project I'm working on for this site and any help you give me will be credited to you. Thanks.