• 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

Problem working through e-book

Q&A Forum › Category: ESP32 › Problem working through e-book
0 Vote Up Vote Down
Michael Picco asked 5 years ago

Hello all!  I have begun working my way through the MicroPython Programming e-book and got stumped.  I am using an EPS-32 Node-MCU.  When I first tried the Blink.py program, it worked just as expected.  However, when I modify it by reducing the sleep time (for a faster blink rate), I can’t get it to run the modified program.
I am using uPyCraft and pressing ‘STOP’, then ‘Download and run’, then ‘STOP’ and press the ‘EN’ button, but the earlier version of the program is what runs, not the modified version.
What am I missing?
Thank you!
Michael
 

Question Tags: Newbie!
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Michael.

I think what might be happening is that the code is not being uploaded to the board. Also, to make sure it runs on your ESP32 board when it resets (when you press the RST/EN button), the file uploaded to the board should be called main.py, or boot.py so that it runs automatically on your ESP32.

If you save the file with any other name, it will only run temporarily if you click the run button on the IDE.

To make sure your changes were saved on your board, on the top left corner of the IDE, there is a tab with the device files. You can see which files are saved on the board. You can click on the files and see their content.

So, you can check whether you uploaded a file called main.py with the changes you refer.

If you’re new to all of this, I know this can be confusing at first. So, let me know if you need further help, or if you need me to explain it in a different way.

Regards,
Sara

0 Vote Up Vote Down
Michael Picco answered 5 years ago

Hello Sara,
The problem was solved when I saved the revised program as main.py!!!    What is the typical development cycle?  It seems that I can create a new program, saved in another filename, but in order to run it in uPyCraft, I need to copy/paste that program into main.py?  Is there another way of doing this so I can execute a program by its given name in uPyCraft?

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Michael.
That’s the way it is done. I know it is a little confusing and not very practical, but that’s the way it works.
Regards,
Sara
 

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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.