Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

MicroPython • Re: main.py is not running on reboot/hard reset.

$
0
0
UPDATE:

Moving the wifi connection and adding the try/finally to main.py worked. The code ran as expected. @hippy alluded to the next problem; it kept running out of memory. So, I added the micropython gc package and reduce the delay between requests down to 15 seconds and printed gc.alloc() and gc.free(). After about 15 request it ran out of memory. Adding the gc.collect() after every request kept the allocated and free memory pretty consistent. Fingers crossed this does it!

Thanks to everyone that offered suggestions! It is always good to know that there is someone out there willing to offer some help.

Statistics: Posted by TomCamp — Thu Feb 01, 2024 2:08 am



Viewing all articles
Browse latest Browse all 8035

Trending Articles