• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Download and run goes to PC file system (not to the generic ESP32 Device)

Q&A Forum › Category: ESP32 › Download and run goes to PC file system (not to the generic ESP32 Device)
0 Vote Up Vote Down
gregg asked 6 years ago

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?

Question Tags: ESP32, Python
5 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

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.

Thanks!
 

0 Vote Up Vote Down
gregg answered 6 years ago

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? 

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

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!

0 Vote Up Vote Down
gregg answered 6 years ago

Yes the I called the MicroPython the “boot code” ….

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

But are you being able to re-flash the ESP with MicroPython successfully?

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.