-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
CircuitPython version and board name
Raspberry Pi Pico, Circuit Python 9.2.8, Mu Editor 1.2
Code/REPL
(See code in description)
Behavior
Editor crashes, erasing the serial window and it's debug messages.
Description
Found that these line of code will work,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP2, divisor=4)
But these line cause everything to crash,
import board
import rotaryio
tuning = rotaryio.IncrementalEncoder(board.GP1, board.GP11, divisor=4)
Fist there are some debug messages which are quickly gone as the serial window closes - it seems this error hard resets the PICO and USB is lost. Then the device / editor is in safe mode that can only be exited by fixing the code.py file on the Pico, exiting the editor, unplugging the pico, then replugging the Pico, then restarting the editor.
It took a long time to finally see the error message 'flash by' before disappearing for me to see the issue. The root cause is the encoder pins must be sequential.....
If possible, it would be really helpful to log the last load messages from the serial window somewhere (I could not find them, if they are kept).
-OR- Other syntax errors seem to just stop the running program and I can fix them, for some reason this particular error crashes the whole shebang. Perhaps the error level/severity can be lowered so the editor does not crash. Perhaps the root cause is in the rotaryio library.
Thanks for your time and effort on the editor.
Additional information
No response