0

Very broad question here. I don't know exactly what the problem is but I'll edit this post as we narrow down the possibilities.

I think I'm running into memory constraints.

I'm running a sketch that records two temperature values every 60 seconds and transmits them to an AWS RDB via wifi. It works well for about two hours then stops. I don't know if it's a memory constraint but I suspect that it is. What other common problems (often overlooked by newbies) can cause a sketch to end after a couple hours of run-time?

Is there a simple way to add an instruction to a loop to clear the SRAM?

Arduino UNO + WiFi 101

Edit #1 12/24/2015:
It's the WiFi board. It happily remains connected to my phone's hotspot but only lasts an hour or two on my home network. Working on root cause...any ideas are welcome!

Edit #2 12/25/2015:
Tried to Wifi.disconnect() and reconnect with no luck. Why do some networks kick the board off while others work just fine? Will look into the watchdog.

  • Sounds like maybe you need to implement watchdog reset. – Ignacio Vazquez-Abrams Dec 25 '15 at 0:45
  • Do you have a link for a decent tutorial? – acpilot Dec 25 '15 at 14:38
  • Look in the log file in WiFi access point for an error message that might guide your debugging. – JRobert Dec 25 '15 at 18:35
1

The problem was solved with a "soft restart" loop. Posts #10 and #11 are all I needed: http://forum.arduino.cc/index.php?topic=49581.0

0

Could you provide your sketch? At the rate you mentioned, 2 hours is merely 240 values and this shouldn't even matter since you are probably reassigning values to the same variables and not storing them in some growing array. Perhaps your WIFI shield merely gets disconnected from the network. How do you mean the sketch stops? Like you no longer receive the values in the database? More info is needed.

  • Good point. I'll try the simple thing first. I'll let it run on my phone hotspot for a few hrs and report back. I'd also like to avoid posting the sketch...I don't want a spoon-fed answer. – acpilot Dec 24 '15 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.