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.


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.

  • \$\begingroup\$ But, RST pin is in use for deep sleep mode. \$\endgroup\$ – Aakura Pyakura May 19 '19 at 17:07
  • \$\begingroup\$ Going to deep sleep does not require the RST pin. It is only required for waking up. \$\endgroup\$ – Ameer May 20 '19 at 16:21
  • \$\begingroup\$ I think I haven't understood your solution here, I am thinking of demonstrating this project. So, if anything happens in the demo period I have to disconnect the RST pin with D0 pin and connect it with RST pin? If that so is this switch useful? \$\endgroup\$ – Aakura Pyakura May 22 '19 at 2:11
  • \$\begingroup\$ Even though you have connected D0 to RST, your code is not using D0. I don't understand why you are connecting the two pins. As for a button, a simple push button would be better. \$\endgroup\$ – Ameer May 23 '19 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.