Core INK freezes after a couple of minutes
-
It may be memory error, I did have issues running sensors on the controllers filling memory and not clearing the memory.
-
attempt without ezdata - it seems as though it secures after two or three updates.
Much obliged
-
Add an execute block to the begging of the program loop and in the block add the following
import gc gc.collect()
This should force micropython to preform garbage collection freeing up memory.
-
@ajb2k3 Thanks a lot! it seems like it's working for now!
-
@felmue Thanks for the advice.
I added a restart after every 120 seconds to save battery, and downloaded the code to the device, but then every time it restarts, it shows the UIflow logo, beeps, etc etc, until it gets to my application page. Do you have any idea why this happens? -
Hello @Navidard
I assume by restart you mean shutdown and restart. So yes, that is how UIFlow works. When the device restarts UIFlow firmware is started and eventually your code gets executed.
Thanks
Felix -
@navidard I went through so much IOT headache before I discovered this. So glad it works.
-
@ajb2k3 Hello, so after fiddling with it yesterday, I understood the same thing still happens. it works for longer periods, but then stops responding again and dies. This is the sketch I am using now:
-
@navidard said in Core INK freezes after a couple of minutes:
@ajb2k3 Hello, so after fiddling with it yesterday, I understood the same thing still happens. it works for longer periods, but then stops responding again and dies. This is the sketch I am using now:
The GC block needs to be inside the If>do loop.
I'm not sure if its a bug as gc.collect() is supposed to run continuously but Inside a loop it forces a reset of gc.collect()
Try putting an execute code block containing import gc next to start and then gc.collect() at the beginning of the if loop
I don't see a main loop function and so to me the code looks to be running in "One Shot" mode and not repeating. -
@ajb2k3 Yes I removed the loop because I wanted to add the restart option at the end of the code to use the low power mode basically.
So now, it restarts, reads and sends the data, and goes to sleep.