Page 27 of 37

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 10:43 am
by Lucje
davef wrote:
Thu May 19, 2022 10:57 am
I would not run a program like that in boot.py.

Leave boot.py with nothing in it.
In main.py

Code: Select all

import my_program
in my_program.py put your wanted program.

Putting that code in boot.py and something goes wrong I am pretty certain that you will not be told what happened.
Tried it, doesn't make a difference.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 10:44 am
by Lucje
davef wrote:
Thu May 19, 2022 10:57 am
I would not run a program like that in boot.py.

Leave boot.py with nothing in it.
In main.py

Code: Select all

import my_program
in my_program.py put your wanted program.

Putting that code in boot.py and something goes wrong I am pretty certain that you will not be told what happened.
Tried it, doesn't make a difference.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 11:15 am
by Lucje
davef wrote:
Thu May 19, 2022 10:57 am
I would not run a program like that in boot.py.

Leave boot.py with nothing in it.
In main.py

Code: Select all

import my_program
in my_program.py put your wanted program.

Putting that code in boot.py and something goes wrong I am pretty certain that you will not be told what happened.
This boot works very good, it tells you which program is currently running and if there is an error which program is at fault.

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 11:19 am
by Lucje
In case you were wondering what I'm making:
It's a remote control car. Why Wifi, just because it can ;)

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 1:09 pm
by Lucje
Apparently I only have to burn the firmware when I plug it in the computer.
It does al work fine as long I don't plug it in.
So guess it's not a big deal then :P

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sat May 21, 2022 8:03 pm
by davef
OK, on your boot.py. I made one of these recently:
https://randomnerdtutorials.com/esp32-c ... eb-server/
with my grandson.

So, you believe your firmware is being corrupted or deleted when you plug it into the PC?

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sun May 22, 2022 2:28 pm
by Lucje
davef wrote:
Sat May 21, 2022 8:03 pm
OK, on your boot.py. I made one of these recently:
https://randomnerdtutorials.com/esp32-c ... eb-server/
with my grandson.
Cool, that was my first system for this little car. But my teacher wished there was communication between 2 Esp32. It was allowed to do this communication wired, but then it was quite a boring rc-car concept. I don't like easy and boring, so I had to challenge myself :D
So, you believe your firmware is being corrupted or deleted when you plug it into the PC?
Yes indeed.
In fact, I've noticed that if I unplug it while it's still on and plug it back in later (without turning it off, rebooting, or resetting) there's no problem. If I turn it off, reboot or reset, I have to re-burn it.
Furthermore, EspNow works very well and I will definitely recommend it to others who are ready (not everyone in my class is equally clever ;) )

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Sun May 22, 2022 8:47 pm
by davef
If you really want to get to the bottom of this problem ... is there a uPycraft forum? When I was looking around randomnerdtutorials I found a tutorial:
https://randomnerdtutorials.com/install ... tructions/
(be careful as it only works with 16.04 unless you compile yourself) with another link to:
https://randomnerdtutorials.com/flash-u ... 2-esp8266/
They seem to use the "boot" button in their process whereas on my system I use the EN button.

For a challenge grab a Linux PC install esptool and rshell and do it all from the command-line :)

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Thu May 26, 2022 2:53 pm
by Lucje
davef wrote:
Sun May 22, 2022 8:47 pm
If you really want to get to the bottom of this problem ... is there a uPycraft forum? When I was looking around randomnerdtutorials I found a tutorial:
https://randomnerdtutorials.com/install ... tructions/
(be careful as it only works with 16.04 unless you compile yourself) with another link to:
https://randomnerdtutorials.com/flash-u ... 2-esp8266/
They seem to use the "boot" button in their process whereas on my system I use the EN button.

For a challenge grab a Linux PC install esptool and rshell and do it all from the command-line :)
I don't think it the problem is uPycraft, I tried it with Thonny and I had the same problem.
But as it's an unknown problem I guess the problem might be this kind of board.
I have ordered an other typ, but as it is from AliExpress it will never be delivered in time. I'll have to use the ones I have.
And if it's the only problem and the rest does work fine, it want be a problem for the project after all.

I thank you all for the assistance.

(PS, I'm a windows guy, I'm not used to use command line (jet ;) ).)

Re: ESP-Now support for ESP32 (and ESP8266)

Posted: Thu May 26, 2022 3:01 pm
by Lucje
davef wrote:
Sun May 22, 2022 8:47 pm
They seem to use the "boot" button in their process whereas on my system I use the EN button.
I've never had to use one of those buttons...

I tried it and it doesn't make any difference.