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.
Jim