Been going through the book on ESP and Python – install the demos and on upycraft and Thonny and both of them when saving open my windows file system.
I have python installed on my machine. But when using these two application and it defaults to the windows file system. How can I direct it back to the connect python device? Using your simple example in both application I am not getting my python Main.py to the generic device (DOIT ESP32) I am connected “Shell” and can turn off and on the blue LED but I cannot get a file over to the ESP32 DOIT board… I know serial port is working, the shell works, the device is burned with the latest esp32 – just cannot run main.py on the board.
from machine import Pin from time import sleep led = Pin(2, Pin.OUT) while True: led.value(not led.value()) sleep(0.5)
When in uPyCraft it seems to hang “already in download mode please wait” It is not getting to download complete.
In Thonny it looks like it is working.. (lighting blue led) Yahoo… Looks like Thonny has the same ability to move the file to the device “using the Device tab”. Want to move it over and see it run on the ESP32 “burned in the flash” test. I am not sure Thonny can program the boot – why can’t one IDE do it all?
Hello Gregg, thank you for the detailed question! I need just two more details.
- What’s the full message that you see in uPyCraft IDE Shell after pressing the “Download and Run” button?
- In Thonny IDE, to upload the main.py file, you do the following: Go to Device and select Upload current script as main script. That should save your open script as the main.py file in your ESP.
I get nothing from uPyCraft – it never gets to the point “download OK” message.. it use to work fine — but not sure what I changed in my setup.. Do you know what the init config does in uPyCraft?
Yes understand Thonny does the same thing.. as I noted in my post.. I used it to down load the main.py to the board so I can do what I need..
Do you know an IDE that also allows to burns the boot code for micropython?
Hello again! I’m not sure what exactly is happening with your setup…
If you press the uPyCraft IDE “Download and Run” button and nothing happens it means uPyCraft can’t communicate with your ESP board:
- Your ESP is busy running a script, so it doesn’t receive a new script
- The ESP is not flashed with MicroPython
I usually recommend re-flashing the ESP with MicroPython and it should work just fine afterwards.
If you experience constant problems with uPyCraft IDE, I recommend using Thonny IDE that has been proven to be more reliable communicating with the ESP.
What do you mean by boot code?
Are you talking about flashing the MicroPython firmware? If so, uPyCraft IDE allows you to flash the MicroPython firmware to your boards.
Thanks for your time!