Arduino code. Air-con temp controller. Please help if you can! Answered
The hardware is an R3 with a custom LDR interface for reading the mode of the air con, and relay interface for changing modes. There are 2 digital probes, one for temp control and the other just for display. This was made for climate control of a small room using a portable air-con.
The controller switches between 3 modes; Heat, Cool and Fan.
What we need is for it to turn the fan on when SP is reached. When starting from a power failure it will switch to fan mode if the temp is within the range of SP+-1. This makes it look like it's working correctly but after that it loops between hot and cold; the fan is never turned on again, although the readout on the controller reflects the temp is OK, so the fan mode should be activated.
I have attached the coding as well as a print out from the serial monitor showing the errors on the controller.
The guy who wrote this for me is unable to figure this out.
Would appreciate any help!