I am bit of a noob when it comes to ESP programming. I have an ESP01 and a USB programmer for it, but every time I unplug it, it resets, which makes me wonder how can I make it battery-powered since every reboot resets the program.
-
1What do you mean by 'reset the program'? The uploaded program should be retained on the esp01 and start running again after a reset/reboot.Bra1n– Bra1n2021年01月02日 10:07:11 +00:00Commented Jan 2, 2021 at 10:07
-
Are you sure, that the program was correctly written to the ESP? How do you see, that the program is not working?chrisl– chrisl2021年01月02日 10:35:40 +00:00Commented Jan 2, 2021 at 10:35
-
I wrote a simple blink program which made it blink when it was programmed.. But once i remove the usb programmer with the esp on, the turns off due to loosing power and when i then plug it in. I start as it was reset.. I flash it using arduinoCarlton Banks– Carlton Banks2021年01月02日 11:41:45 +00:00Commented Jan 2, 2021 at 11:41
-
It stops blinking in the intended frequencyCarlton Banks– Carlton Banks2021年01月02日 12:47:53 +00:00Commented Jan 2, 2021 at 12:47
-
1if you have io 0 to ground it always goes into flashing mode. you have to pull-up io 0Juraj– Juraj ♦2021年01月02日 13:53:46 +00:00Commented Jan 2, 2021 at 13:53
1 Answer 1
The ESP-01 ... and all ESP8622 ... have two modes for operation.
Flash mode / Boot load mode - on bootup (at the time an electrical current is first applied, or after the reset pin is grounded), if the GPIO0 (GPIO Zero) pin {On the ESP-01 this is the 7th pin} is connected to ground, the chip goes into non-run, receive program mode. This is where you load the compiled program.
Normal - on bootup (as above), but GPIO0 is NOT ground, then the ESP-01 goes into run mode.
-
1I had it in flash mode all the time.Carlton Banks– Carlton Banks2021年01月04日 13:19:33 +00:00Commented Jan 4, 2021 at 13:19