Hey all- has anyone had any success with timeout methods? I have a method sending data to the cloud every couple minutes on a timer. It works fine 99% of the time, but sometimes it will hang and cease reporting entirely until a restart SMS trigger is sent.
Any ideas how to implement a sort of timeout check, for if it has taken more than say, 10 seconds to send the message to the cloud, restart the device?
My current method (that doesn’t work) involves checking the length of time it takes to send the message to the cloud and restarting if it’s over a certain time value. However, this doesn’t work if it gets hung up on the report itself.
More of an arduino-related question, but figured I’d post here.