Hi everyone!
I am working on a project, where I control multiple servos through Raspberry Pi Pico 2 W. I use my wifi to connect to Pico. I give commands through my browser on pc and servos change their position. And when I unplug and re-plug the power to the project, main.py is restarting as it should. So, no issues here.
Issues start when I need to upgrade the code. When I unplug the Pico from my project and connect it to my pc via USB, I still cannot access the code on Pico through Thonny, because as soon as I connect USB cable, main.py starts immediately and Pico is not accessible in Thonny anymore as it's "already in use".
Thus, I end up nuking the Pico every time (flash_nuke.uf2), re-flashing it and re-uploading all the code again.
I have seen some recommendations to do a "reset" button. Yes, Pico is reset, but main.py immediately is restarting, so a reset button doesn't help here.
Any recommendations on how to stop main.py without nuking the Pico 2 W ?
Thanks in advance for any recommendations.
I am working on a project, where I control multiple servos through Raspberry Pi Pico 2 W. I use my wifi to connect to Pico. I give commands through my browser on pc and servos change their position. And when I unplug and re-plug the power to the project, main.py is restarting as it should. So, no issues here.
Issues start when I need to upgrade the code. When I unplug the Pico from my project and connect it to my pc via USB, I still cannot access the code on Pico through Thonny, because as soon as I connect USB cable, main.py starts immediately and Pico is not accessible in Thonny anymore as it's "already in use".
Thus, I end up nuking the Pico every time (flash_nuke.uf2), re-flashing it and re-uploading all the code again.
I have seen some recommendations to do a "reset" button. Yes, Pico is reset, but main.py immediately is restarting, so a reset button doesn't help here.
Any recommendations on how to stop main.py without nuking the Pico 2 W ?
Thanks in advance for any recommendations.
Statistics: Posted by bestrasp — Fri Jan 31, 2025 8:53 am