I am new to ESP32, MicroPython and Thonny. I am going through your Micropython book. I was using the UpyCraft IDE until I could not resolve the serial port issue. This Thonny seems to work ok except a couple of issues The first is there is nothing when I follow the instructions below. Just a statement; “Where are all the commands?”
The second and one that concerns me. I have the LED Blinking script running.. Loads with no issue. If I unplug the ESP32 and reconnect the USB cable, I have power but the program does not start running.. Tried the reset button and nothing. I have to stop and then run the program again from Thonny. This is not normal. Any thoughts?
Tim
- Go to Device > Upload current script with current name
Hi Tim.
I’m sorry for that issue.
- Answering your first question:
It seems that Thonny IDE was updated.
Now, to upload code, you need to go to File > Save as > MicroPython device and then add a name.
We’ll update our instructions in the next eBook update.
2. Answering your second question:
When you click on the green “play” button, it runs the code on the MicroPython device (the ESP32 or ESP8266), but it doesn’t upload the code. This means the code is not saved on the board.
So, if you disconnect the board from the computer, it won’t run the code, because it doesn’t have any code uploaded. This feature is useful if you want to quickly test your code without having to upload it to the board.
If you follow the previous instructions to upload the code (Save as > MicroPython device), the code is actually saved on the board. So, if you disconnect it from the computer and press the RST button to restar the board, it will run the saved code.
I hope this is clear.
Let me know if you have more doubts.
Regards,
Sara