Hi, I’ve I’ve attached a program I wrote for an Etherten for controlling the temperature of a fridge. It uses the ethernet device to ask a HTTP server what temperature it should try and keep the fridge at, as well as reporting the current temperature to the HTTP server (for graphing and analysis).
However I have a problem with this code, it will randomly decide to start heating, even though that should only be happening when it is below a certain temperature. I can’t work out any pattern to when it turns on the heating, and it has never had both on at the same time, indicating it is something wrong with the logic around the if statement and not some other random thing deciding to turn that pin on.
I’m still quite new to Arduino coding, is anyone able to take a look at this and figure out where the problem is?
etherten.ino (3.56 KB)