Pico W : Script not depending on UART or REPL but needs me to press several times RETURN key on REPL (mpremote) to continue execution #11136
Unanswered
mchobby
asked this question in
RP2040 / Pico
Replies: 1 comment
-
I moved the code to a Pico (no wireless) and looks to work pretty well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a really strange issue with my Pico W running on MicroPython v1.19.1 .
The project is a port of the robot zumo (for pololu) to make it running with Pico/Pico W under MicroPython.
Here a picture from the micropython-zumo-robot GitHub repository.
The test_readline3.py code copied to main.py is quite simple an read the value from line tracker sensor (I will write details later) (no boot.py file in this setup).
I have no memory issue and no stack issue (carefully checked, also controlled with
mem_info()
). No memory fragmentation.It often got stuck at one moment or the other. After I applied the RETURN key solution the script can run up to 382K iteration without issue.
A day (by hazard), I discovered than pressing the RETURN key in REPL did make the script executing one line forward (because IR LED activation did Light on)... after several RETURN keys pressed in REPL the script suddenly restart running "forever".
The way it work, the QTR sensor from Pololu requires the Pin to be set as OUTPUT for charging capacitor then switch back to input an measure the decay time. So, the Pin mode is constantly changed while using the sensor.
If REPL is not available (because not connected to PC) then the script waits forever.
Could the VM get stuck (on hold) for strange reason ?
This issue driving me completely crazy.
Beta Was this translation helpful? Give feedback.
All reactions