Guy Levin
Guy Levin

Reputation: 1258

Can't connect to D1 Mini with Micropython after running a program

I'm using D1 Mini with micropython It happens a lot that I upload some code that has a main loop in it, and afterwards I lose connection to the board I can see the console output, but can't see the files, can't burn a new firmware, can't stop the code from running, anything...

If I press ctrl+c or ctrl+d it holds for a second, then continues

I'm using a raspberry pi and Thonny for the development

Same from esptool and ampy

Tried looking for an answer online, but couldn't find anything relevant

What can I do?

Upvotes: 0

Views: 260

Answers (2)

Guy Levin
Guy Levin

Reputation: 1258

Moved from pi to windows, I was able to delete and write the firmware again using esptool

The only thing is that now I have to press the reset button while connecting the USB so the computer will recognize the controller

Upvotes: 0

Lixas
Lixas

Reputation: 7288

What I do in my apps- I add time.sleep(3) at the beginning of my application. And when I wish to do code upload, I connect to the board, press CTRL+D for soft reset and CTRL+C to kill code. Then do upload required code. This approach works best for me.

Upvotes: 2

Related Questions