philba wrote:the code is doing exactly what you are telling it to do. You might try using temp rather than temp1, though. Plus, assuming outputting a high turns the heater on, it looks like your code will turn the heater off when the temperature is low and on when it's high. Perhaps you want to think about your logic a bit more.
Plus, you should learn about hysteresis. Basically, turn the heater on when the temperature reaches a degree or two below the set point and turn it off when it' reaches the same amount above the set point. You could wind up cycling the heater fairly quickly otherwise. This means you have to take into account if the heater is on or off as well as the temperature.
thanks for the help as of now temp sensor and heater pin r synced .i ordered another rtc breakout kit just in case. i have yet to get a valid time reading at all maybe wrong address idk. is there a way to test the rtc with my multimeter? Also after about 20 mins lcd goes blank?