MRK1000 reset pinout and WiFi101

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

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 ???

Jim

1.8.1 stable here on MKR's under win 7 x64 pro, Server 2012 (aka win 8 subset)

There are a few deeper reset methods but I never managed to get one that worked reliable and your solution is nice and simple although I think I read somewhere about using either a capacitor or resistor when doing a pin reset but I may be off base a little and you would have to research a little more.

Thank you BallscrewBob -

I am sorry I cross posted this, but it is a little difficult to find the proper group sometimes. It is only in the MRK1000 section and the IOT of things group, and of course here. My original post was in reply to a another user with the same "intermittent" disconnect. Sandeepmistry had offered his help to her, but this was a different approach for the both of us.

Thanks again for your reply.

In looking at the schematic I do see a 330 ohm resistor inline with the reset button, and that certainly can not hurt. I am still unclear how to "label" the pin. Is it called "P24" ??? I have attached an enlarged portion of the schematic, if you don't mind looking at it.

Jim

Screen Shot 2017-01-21 at 10.46.33 PM.png

That looks sort of familiar so just copy that from the pin you choose to use as reset with the 100 nF (C20) and the 330 Ohm (R7) resistor and you should be fine.

Sandeep is the best person around for the MKR so take note of his posts as they are always useful.

Thanks again for the reply -

However, I am still not sure I am asking the question I really need to answer. For example, in a standard sketch, if I assign a variable named "ledPin" to A1 which is "analog 1" ... I am really using the third pin on the left side of the IC chip. My code would be something like:

"#define ledPin A1"

The Analog and Digital pins are pretty easy to understand ... but I want to use the "reset" pin.

The question is what "name" would I use for that pin? "reset" ???? It is actually pin 5 on J5, just as A1 is pin 3 on J4

Jim

Are you pulling pin 10 (reset) low with an IO from another pin ?
if thats the case you can define it as whatever you wish.
RST, RESET, KILLSWITCH etc.

There are two resets one on (pin 10) the jtag header and one on the regular pins (pin 10 on the schem but a regular connector also )

mkr reset.jpg

Have you tried them both ?

mkr reset.jpg