-->
Page 2 of 2

Re: Restart ESP8266 from code

PostPosted: Mon Sep 17, 2018 5:47 pm
by Mr Freeze
In main loop you can meet its incorrect.
But you can do function esp_reset and ask it from main loop. For me its working.
void loop()
{
esp_reset(0;
}
//-----------------
void esp_reset()
{
ESP.reset();
}

Re: Restart ESP8266 from code

PostPosted: Fri Sep 21, 2018 4:23 pm
by schufti
AFAIK ESP.reset() restarts exactly the same way it did at last power-up (does not evaluate gpio0,2,15 anew).
So if the last power-up was into flash mode, ESP.reset() will end up in flash mode ...

Re: Restart ESP8266 from code

PostPosted: Tue Oct 23, 2018 6:38 am
by AcmeUK
You say you want to do a RESTART but you are doing a RESET.

See here for the difference between ESP.reset() and ESP.restar()t:-

http://www.pieterverhees.nl/sparklesagarbage/esp8266/130-difference-between-esp-reset-and-esp-restart