Boot problem ? on ESP32 MicroPython
Boot problem ? on ESP32 MicroPython
Hello
I use "MakePython ESP32 Development Kit" with Thonny IDE ,I have very much problem... I often must reintroduce the firmware to use it again......
Now my problem...impossible to run a program after a power off. I had not this problem at the beginning , I have done a mistake and I don't know how to repair it
I download a projet in my kit connected to the PC with Thonny , the program run very well ...
I cut the power (disconnect USB) and reconnect the board to the USB (to power the board) ,the programm do not run .....!!
(the program seems not to be registred in the board ? or not reboot ?)
I must sometime for downloading again disconnect all components on the board !!!
Thank you for your help
Best regards
Message I received .....
WARNING:root:Unexpected echo. Expected b'%Run -c $EDITOR_CONTENT\r\n', got b'ets Jun 8 2016 00:22:57\r'
I use "MakePython ESP32 Development Kit" with Thonny IDE ,I have very much problem... I often must reintroduce the firmware to use it again......
Now my problem...impossible to run a program after a power off. I had not this problem at the beginning , I have done a mistake and I don't know how to repair it
I download a projet in my kit connected to the PC with Thonny , the program run very well ...
I cut the power (disconnect USB) and reconnect the board to the USB (to power the board) ,the programm do not run .....!!
(the program seems not to be registred in the board ? or not reboot ?)
I must sometime for downloading again disconnect all components on the board !!!
Thank you for your help
Best regards
Message I received .....
WARNING:root:Unexpected echo. Expected b'%Run -c $EDITOR_CONTENT\r\n', got b'ets Jun 8 2016 00:22:57\r'
Re: Boot problem ? on ESP32 MicroPython
Hi, have you tested the ESP32 board with any other code? Kindly check if you can upload any other simple code to the ESP-32.
Re: Boot problem ? on ESP32 MicroPython
Thanks very much
Yes if my board is connected i can download my program and run it , if i disconnect the board and reconnect it , the program do not run ....i must redownload it and sometime it' s impossible when components are connected
Why can i not run my program simply without the IDE Thonny , just the board connected to the power ?
Thanks very much
Yes if my board is connected i can download my program and run it , if i disconnect the board and reconnect it , the program do not run ....i must redownload it and sometime it' s impossible when components are connected
Why can i not run my program simply without the IDE Thonny , just the board connected to the power ?
Thanks very much
Re: Boot problem ? on ESP32 MicroPython
Tell us which GPIO ports you have things connected to. Also, which ESP32 board and ESP32 variant.
Re: Boot problem ? on ESP32 MicroPython
Thanks for your help....
I use this board:
https://www.makerfabs.com/makepython-es ... r-kit.html
The main problem is that my program seems not to bee flashed in the board or there is a boot problem
A simple program like this one:
from machine import Pin,Timer
led2 = Pin(2,Pin.OUT)
tim = Timer(0)
led_state =False
def FlashLed(timer):
global led_state
led_state=not led_state
led2.value(led_state)
tim.init(period=1000,mode=Timer.PERIODIC,callback=FlashLed)
This program run well , when downloaded with Thonny....the Led is flasching....
But if i disconnect the board and reconnect to power it , the program do not run , the Led do not flash
I must download again with Thonny to run it again and the Led flash....
I try with uPyVraft but it's the same
What can i do ??
A great thanks for your help
Best regards
I use this board:
https://www.makerfabs.com/makepython-es ... r-kit.html
The main problem is that my program seems not to bee flashed in the board or there is a boot problem
A simple program like this one:
from machine import Pin,Timer
led2 = Pin(2,Pin.OUT)
tim = Timer(0)
led_state =False
def FlashLed(timer):
global led_state
led_state=not led_state
led2.value(led_state)
tim.init(period=1000,mode=Timer.PERIODIC,callback=FlashLed)
This program run well , when downloaded with Thonny....the Led is flasching....
But if i disconnect the board and reconnect to power it , the program do not run , the Led do not flash
I must download again with Thonny to run it again and the Led flash....
I try with uPyVraft but it's the same
What can i do ??
A great thanks for your help
Best regards
Re: Boot problem ? on ESP32 MicroPython
Just posted this on another thread, so maybe try this:
- leave the boot file as is
- in main.py just call your program like:
and
- have the all the code you want to run in my_program.py
As an aid for debugging in main place at the top (first thing that gets executed) :
so that you can break into my_program.py and make changes.
- leave the boot file as is
- in main.py just call your program like:
Code: Select all
import my_program
- have the all the code you want to run in my_program.py
As an aid for debugging in main place at the top (first thing that gets executed) :
Code: Select all
print ('Hit CTRL-C to edit')
utime.sleep(5)
Re: Boot problem ? on ESP32 MicroPython
Thanks for your help.....
But I don't anderstand what you have discribed ....
The only file on my board is "Boot.py" ,no directory
and as you can see there is no code in Boot.py:
Boot.py content this code
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
#import webrepl
#webrepl.start()
Always very happy for your precious help
best regards
But I don't anderstand what you have discribed ....
The only file on my board is "Boot.py" ,no directory
and as you can see there is no code in Boot.py:
Boot.py content this code
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
#import webrepl
#webrepl.start()
Always very happy for your precious help
best regards
Re: Boot problem ? on ESP32 MicroPython
Where are you placing your "blinking LED" program? Or what do you call the file that has the blinking LED code in it?
Last edited by davef on Mon May 09, 2022 8:51 am, edited 1 time in total.
Re: Boot problem ? on ESP32 MicroPython
I have not used Thonny. Are you sure that the program has actually been downloaded to the flash on the ESP32?
Do you run Linux or Windows?
Do you run Linux or Windows?
Re: Boot problem ? on ESP32 MicroPython
1) leave boot.py as it is
2) in main.py place:
3) in a file called my_Led.py place:
4) download main.py and my_Led.py to the ESP32
Unplug the USB and hit the EN (reset)button.
Be aware some ESP32 boards use GPIO2 to turn on a on-board LED. You might want to use another pin like 33.
2) in main.py place:
Code: Select all
import my_Led
Code: Select all
import machine
from machine import Pin
pin2 = Pin(2, Pin.OUT)
while True:
# heartbeat
pin2.on()
utime.sleep_ms(150)
pin2.off()
utime.sleep_ms(150)
pin2.on()
utime.sleep_ms(150)
pin2.off()
print ('another loop')
Unplug the USB and hit the EN (reset)button.
Be aware some ESP32 boards use GPIO2 to turn on a on-board LED. You might want to use another pin like 33.