Reset Huzzah from software

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dhovden
 
Posts: 1
Joined: Thu Jan 07, 2016 12:10 pm

Reset Huzzah from software

Post by dhovden »

Building an app which uses the MySQL connector to send various measured data to a MySQL database. Works well but at times the MySQL connection goes away and refuses to return, the only way to get it back is a hard reset.

Now, I would like to detect this in software and issue a reset from the code. This is what I'm using now:

void soft_reset() {
pinMode(0,OUTPUT);
digitalWrite(0,1);
pinMode(2,OUTPUT);
digitalWrite(2,1);

ESP.restart();
}

But it doesn't work, at least not completely. The Huzzah stops, sends some weird characters to the serial monitor but that's it: no restart.

Setting GPIO0 and 2 high, read that at https://github.com/esp8266/Arduino/issues/793, not sure if it's correct.
Anyway, does anyone know a way to reset the Huzzah from code that actually works?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Reset Huzzah from software

Post by adafruit_support_rick »

I think you'd have better luck with this question over at the ESP8266 forums:
http://www.esp8266.com

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”