Hi everyone,
That's my first topic on the forum.
I've been looking everywhere on the web how to autorun my main file on my ESP32 board.
I can't do that and that's a problem for the project I'm trying to do.
I try to call my main file in my boot file but that never works...
That's why I'm looking for your help...
If you have a solution please help me...
Thanks in advance.
Have a nice day.
Autorun my main file
- CmdrDeLiver
- Posts: 27
- Joined: Thu Dec 05, 2019 6:30 pm
Re: Autorun my main file
Hi PedroJuan.
The times when main.py hasn't loaded for me, I've found problems in boot.py.
Best of luck,
Mike
You don't need to call main.py. That will be done for you once boot.py finishes.
You might try debugging your boot.py and main.py files.boot.py: runs when the device starts and sets up several configuration options;
main.py: this is the main script that contains your code. It is executed immediately after the boot.py.
Code: Select all
print("boot.py finished") #at the very end of boot.py
print("main.py started") #as the first line of main.py
Best of luck,
Mike
Re: Autorun my main file
hi CmdrDeliver
First of all thanks a lot for your answer.
I'll try to do that and see what's comming. At least I'll know if there is a problem in my boot.py.
However sometimes when I run my programme even when there is nothing in my boot.py the main.py doesn't run automaticaly.
I'll tell you when I'll try again
Have a nice day.
Pierre
First of all thanks a lot for your answer.
I'll try to do that and see what's comming. At least I'll know if there is a problem in my boot.py.
However sometimes when I run my programme even when there is nothing in my boot.py the main.py doesn't run automaticaly.
I'll tell you when I'll try again
Have a nice day.
Pierre
Re: Autorun my main file
Then I come back to you,
My problem is still the same. I'll explain my project :
I try to use an esp32 for a project (I'm using wipy3.0). And in this project I want that my esp32 run the program immediatly when it gets power. However, for now, when I put power on my esp32 nothing happens, I'm pretty sure that the file boot.py doesn't run and that's a big problem for me...
Can someone help me?
Thanks in advance
My problem is still the same. I'll explain my project :
I try to use an esp32 for a project (I'm using wipy3.0). And in this project I want that my esp32 run the program immediatly when it gets power. However, for now, when I put power on my esp32 nothing happens, I'm pretty sure that the file boot.py doesn't run and that's a big problem for me...
Can someone help me?
Thanks in advance
Re: Autorun my main file
Describe how you program the device and get to run properly before removing the programmer and power.
Maybe, the board is not in the correct boot mode.
If you apply power can you get it to run after hitting the boot button?
What are you powering the device with and how is the power applied? Mechanical switch, electronic switch or by manual connection?
Maybe, the board is not in the correct boot mode.
If you apply power can you get it to run after hitting the boot button?
What are you powering the device with and how is the power applied? Mechanical switch, electronic switch or by manual connection?
Re: Autorun my main file
Hi,
I have no idea how it worked but my program finnaly autorun when I boot upload the project directly on my board.
I didn't really changed it but I think that's because only this project was open contrary to last week...
Thanks to the ones who tried to help me!
Pedro
I have no idea how it worked but my program finnaly autorun when I boot upload the project directly on my board.
I didn't really changed it but I think that's because only this project was open contrary to last week...
Thanks to the ones who tried to help me!
Pedro