Arduino: ESP.shutdown()

Created on 25 Oct 2015  Â·  8Comments  Â·  Source: esp8266/Arduino

Would it possible to have command ESP.shutdown().

So that after device has done its work it would shutdown and it would reboot only after manually turning off/on the power. ESP.deepsleep() is not an option here as device should never wake up.

question

Most helpful comment

Tried but CH_PD needs to be VCC before even any code runs. Anyway, solved it by letting it sleep 21 000 years, ESP.deepSleep(999999999*999999999U, WAKE_NO_RFCAL);
Now I only have to wait and see if it works....

All 8 comments

You can done all work in setup or broke while in loop and after use button or circuit or power cut to reset ..

I think no control by sdk

Sent from my iPhone

On 25 ott 2015, at 13:25, rouhu [email protected] wrote:

Would it possible to have command ESP.shutdown().

So that after device has done its work it would shutdown and it would reboot only after manually turning off/on the power. ESP.deepsleep() is not an option here as device should never wake up.

—
Reply to this email directly or view it on GitHub.

you can use ESP.deepsleep().
normaly GPIO16 is connected to RESET an is low in case of sleep.
if you create your own circuit that Reset is low and keep it low until you remove the power you can sleep as long you want.
may simply using a Flipflop.

I think the easiest way to achieve this is using a single P-MOS transistor.

Using ESP01 and 0 and 2 Pins are taken but if I connect TX pin to CH_PD and put it HIGH on boot and LOW on shutdown. Should work ?

ESP will output some stuff to TX pin on startup, so this won't work with TX
pin.

On Thu, Oct 29, 2015 at 11:09 AM, rouhu [email protected] wrote:

Using ESP01 and 0 and 2 Pins are taken but if I connect TX pin to CH_PD
and put it HIGH on boot and LOW on shutdown. Should work ?

—
Reply to this email directly or view it on GitHub
https://github.com/esp8266/Arduino/issues/929#issuecomment-152108135.

All right, would RX pin work instead ?

Tried but CH_PD needs to be VCC before even any code runs. Anyway, solved it by letting it sleep 21 000 years, ESP.deepSleep(999999999*999999999U, WAKE_NO_RFCAL);
Now I only have to wait and see if it works....

Rather than sleeping for time, You can use

ESP.deepSleep(0);

It will wake up only on reset or restart..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markusschweitzer picture markusschweitzer  Â·  3Comments

Geend picture Geend  Â·  3Comments

rudydevolder picture rudydevolder  Â·  3Comments

mechanic98 picture mechanic98  Â·  3Comments

hulkco picture hulkco  Â·  3Comments