Hello, some people in my office has started working on a temperature control project using an arduino uno and they asked for my help regarding the programming portion of the task.
You can find the code here: GitHub - vodkatad/termostatino: Codice per controllo temperatura con arduino
Basically arduino reads the temperature every ten seconds and does a POST to a server that sends a mail if the temperature rises above a certain cutoff or does not hear from arduino for some time. There is also a leftover piece of code in arduino that switches on/off a relay based on temperature values but right now that behaviour is not needed.
My problem is that this setup is unstable: after a while (that varies without any regularities that I was able to spot...it could work perfectly for 12 hours or only for 30 minutes) it stops sending POST requests, the attached LCD display is not refreshed with new temp values and also the serial becomes mute....but If I ping its IP I am able to reach it.
Up until today I only realized about the end of the POST requests so I believed it was only a problem with the Ethernet library (you can see old commits with different strategies about the HTTP connection) but when I saw that it was not reading temperatures and writing to the serial port anymore I started having doubts about what could be the issue. Is it obviously related to the sw or could it somehow depend on some hw problem? The circuit is still using a breadboard.
I'm sorry, maybe similar issues have already been discussed here but I had some trouble in thinking about an appropriate search combo for my problem. If the schematics are needed I will gladly post them.
Thank you very much for your help,