Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 1) Do you happened to have anything connect to reset pin, for example, from the USB-TTL serial adaptor? 2) Try to use CH_PD instead of RESET pin to see if it works? For CH_PD, it will depends on whether you have ESP-01 or ESP-01S (which already has a pull resistor on CH_PD). Commented Sep 22, 2020 at 3:22
  • 1
    while(!Serial) { } does nothing on esp. why do you have Serial.setTimeout(2000);? let the esp start completely before going to sleep. I guess it is still in process of autoconnecting to last remembered AP. Commented Sep 22, 2020 at 5:33
  • @hcheung The board is an ESP-01, not an ESP-01S. I'm programming it with a simple USB-TTL flasher also sold by Inland, plugged into the USB port of my Macbook. When the board is plugged into the flasher the RST pin is pulled up to 3v3 by a 12K resistor. So I should try connecting GPIO 16 or CH_PD instead of RST and see what happens? Commented Sep 22, 2020 at 5:54
  • @Juraj Good question! I"m not sure, I copied the code since I'm not quite sure what I'm doing. I commented out the lines with while(!Serial)... and Serial.setTimout.... and the result didn't change. As I mentioned, I can run the exact same sketch on several ESP8266 Nodemcu boards and it works fine, so I figured the problem wasn't with the software. Commented Sep 22, 2020 at 5:57
  • I need to amend one thing: I said "after 15 seconds it wakes up by a reset, but ....". This isn't totally clear. As an experiment, I ran the sketch on a nodemcu board (where it works perfectly), but I did NOT connect GPIO 16 to RST with the jumper. The result is exactly the same it goes to sleep, then after 15 seconds prints ets Jan 8 2013,rst cause:2, boot mode:(3,6), and nothing else, and then hangs. In other words the ESP-01 board is behaving exactly as if GPIO 16 is NOT connected to RST. Commented Sep 22, 2020 at 5:59