ESP32 can't run the program after reset or re-supply power

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mqcrexcel
Posts: 7
Joined: Mon Apr 15, 2019 9:45 am

ESP32 can't run the program after reset or re-supply power

Post by mqcrexcel » Mon Apr 15, 2019 9:56 am

Hi every body. I'm from Viet Nam and the MicroPython user in my country is very few...
I going to learn MicroPython, and today i code the simple blink LED.... It working , the LED is blinked.. But when i turn off the power and
Re-supply power .... The LED is not blink ....
So i want to ask you :
1: When i push reset button... The micropython source code was reset ??? and earse the program ?
2: If not, how to hold the program still working ??
Thank you .. And sorry about my English !!

User avatar
Roberthh
Posts: 1324
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 can't run the program after reset or re-supply power

Post by Roberthh » Mon Apr 15, 2019 2:04 pm

If you do not store the code in a file on the device, it is lost after reset. There are many tools to copy files between your PC and the Micropython device, like rhshell, ampy, webrepl, upycraft, ... Most Micropython devices have an small internal file system in which you can store your scripts, and execute them with:
import myfile
iIf your file is called for instance "myfile.py"

mqcrexcel
Posts: 7
Joined: Mon Apr 15, 2019 9:45 am

Re: ESP32 can't run the program after reset or re-supply power

Post by mqcrexcel » Mon Apr 15, 2019 2:07 pm

Roberthh wrote:
Mon Apr 15, 2019 2:04 pm
If you do not store the code in a file on the device, it is lost after reset. There are many tools to copy files between your PC and the Micropython device, like rhshell, ampy, webrepl, upycraft, ... Most Micropython devices have an small internal file system in which you can store your scripts, and execute them with:
import myfile
iIf your file is called for instance "myfile.py"
Can you show me how to usse this...
Or if you have a tutorial link, pls give me. Thank you alot..

User avatar
Roberthh
Posts: 1324
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 can't run the program after reset or re-supply power

Post by Roberthh » Mon Apr 15, 2019 2:57 pm

Which device are you using?

mqcrexcel
Posts: 7
Joined: Mon Apr 15, 2019 9:45 am

Re: ESP32 can't run the program after reset or re-supply power

Post by mqcrexcel » Mon Apr 15, 2019 3:19 pm

Roberthh wrote:
Mon Apr 15, 2019 2:57 pm
Which device are you using?
I Using ESP32 and ESP8266

Post Reply