Hard reset for MKR1000 board

All -

I am looking for a way to reset the MKR1000 board within in a sketch, based on a certain number of retries when a connection is lost to the WiFi. I know this seems like an odd way to solve a problem, but when I loose a WiFi connection, and I simply unplug or reset the MKR1000, I have always been reconnected to the WiFi without a problem.

I have followed and contributed to other discussions with sandeepmistry and aurora123 in the MKR1000 part of the forum, but so far no concrete solutions, so I thought I would try another approach.

Looking at the "pinout" on the MKR1000 schematic ... it seems that the 24th pin of the chip is the RESET_N pin. There is also a WIFI_RESET_N pin 50? Can someone suggest or explain the difference?

Could I simply put in a bit of code to set one of those pins to low?

Something like:

#define ResetPin 24 // or whatever pin is the reset pin

pinmode(ResetPin, INPUT);

// Based on the number of retries ...
digitalWrite(ResetPin, LOW);

Again - It seems like a strange way to solve a problem, but it seems to work when I manually reset.

My current Arduino IDE is 1.6.11 running the WiFi101.h library dated 2011 - 2014

Does anyone have comments on the current Arduino IDE which seems to be 1.8.1 ??? Or any comments on WiFi connectivity using the on board WiFi101 chip? My signal strength averages about -70 to -64. I have had days of uptime, but when it disconnects, it will not reconnect.


I feel your pain. My MKR1000 project also requires a hardware reset to get WIFI going again. I am using all the latest libraries and board firmware. When the board locks up it may not be able to reset itself. It is a very difficult problem to replicate since it is so random and may be a hardware noise or asynchronous timing event.
I have given up on the MKR1000 for safety reasons. (If my temperature sensor get stuck my furnace may get stuck ON or OFF!) I converted my project to use the ESP8266 based NodeMUA LUA with CP2102. I now have three ESP2866 based projects and I have NEVER had to power ON reset them. They successfully reconnnect to WIFI if I reboot my WIFI router.


Perhaps what you need is a watchdog timer?

Perhaps this GitHub - adafruit/Adafruit_SleepyDog: Arduino library to use the watchdog timer for system reset and low power sleep.

Or this (poorly documented) code on GitHub - SodaqMoja/Sodaq_wdt: An Arduino library for the watchdog for this purpose.