Electronic – Resetting of NodeMCU ESP8266 in deep sleep

#nodemcudataloggeresp8266reset

I have been doing a project as my first project to learn ESP8266 applications. My project is a temperature and humidity values data logger and upload the data to Thingspeak.

The sensor used is DHT11.

I am using a NodeMCU ESP12 v0.9 board as in this image:

enter image description here

Connection diagram is:Connection diagram of temperature and humidity data logger

The code you can see is this.

The problem that I faced is:

When it is running and the battery dies the whole system doesn't restart from the start. It remains in sleep condition, I have waited like 30 minutes thinking the nodemcu would wake up from sleep but no it doesn't.

I want to know if there is reset code that can be used or a push button or switch should be used to reset.

Best Answer

Connect a button to RST pin on NodeMCU (3rd pin from bottom left) and then to ground. When you press the button RST is pulled low and NodeMCU should reset and wake up fro deep sleep.