How do I reset my main.py file?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
ozigzagor
Posts: 4
Joined: Wed Jul 08, 2020 5:12 am

How do I reset my main.py file?

Post by ozigzagor » Wed Jul 08, 2020 5:37 pm

I kinda messed up the code in my board and now it won't connect to the REPL. I need to fix this. Do you guys have any suggestions?

I detached the REPL from UART0, which was sort of an apparent (but hopefully recoverable) suicide for my D1 Mini.

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

Re: How do I reset my main.py file?

Post by Roberthh » Wed Jul 08, 2020 8:01 pm

You can always erase the flash with esptool.py and have a fresh new start.

rpr
Posts: 82
Joined: Sat Oct 27, 2018 5:17 pm

Re: How do I reset my main.py file?

Post by rpr » Thu Jul 09, 2020 2:55 am

Can you copy an empty main.py via rshell? Then power cycle.

User avatar
ozigzagor
Posts: 4
Joined: Wed Jul 08, 2020 5:12 am

Re: How do I reset my main.py file?

Post by ozigzagor » Thu Jul 09, 2020 9:36 am

Roberthh wrote:
Wed Jul 08, 2020 8:01 pm
You can always erase the flash with esptool.py and have a fresh new start.
Thank you very much, this worked! Here, have a ❤️ for my appreciation.
rpr wrote:
Thu Jul 09, 2020 2:55 am
Can you copy an empty main.py via rshell? Then power cycle.
Thanks for the reply. Didn't try it as Robert's solution already worked.

Post Reply