Restart code when micropython throws error
We have a device running on the field that uses the pysense board.
Sometimes the python code on the device crashes with the error "Pysense board not detected". When reset the device it works fine again. Now in the field I can't do this. So when this happens it just stops executing any code. Is there a possibility to just restart a python program when it crashes with a random error? (like you have restart=always on systemd on linux for example?)
This post is deleted!
livius last edited by
you can use also watchdog
robert-hh last edited by
@aptusmarvin There is the machine.reset() method, which works like pushing the reset button. If you can detect the crash state by software, for instance if it throws an python exception, then you can call this.