Hello,
After trying to solve this problem for several days I have decided to try asking here. I feel this should be an easy thing to do, but I can't make it work.
I am trying to use an Arduino Uno with an ethernet shield at a remote site to monitor voltages and data connection. I am using wireless routers for data communications. Sometimes the routers will "hang" and not pass traffic even though they still have a connection. I have the remote wireless router checking the http connection with the main data collection computer located 50 miles away once every 15 minutes. If it does not get a response the Arduino will flip a relay off, wait 15 seconds and then back on again. The problem is, I want to limit the power cycles to four times. This station is repeated through another site and the problem could be at the repeater site so I don't want to keep bouncing my radio over and over until I can get there (this location is approximately 400 miles from my office). I have tried "for" statements (Line 124) and "while" statements but I still haven't been able to get it to stop power cycling, it just seems to ignore it.
Please just point me in the right direction - I want to learn how to fix it myself.
The code is too long to post here so I have included it as an attachment.
Thanks,
John
FYI - If you are wondering, this is for an earthquake monitoring station in East Tennessee.
WMTN2.txt (7.73 KB)