adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.09k stars 1.22k forks source link

rotaryio on RP2350 Non-functional #9695

Closed dcooperdalrymple closed 2 weeks ago

dcooperdalrymple commented 2 weeks ago

CircuitPython version

Adafruit CircuitPython 9.2.0-beta.0 on 2024-09-17; Raspberry Pi Pico 2 with rp2350a

Code/REPL

import rotaryio
import time
import board

enc = rotaryio.IncrementalEncoder(board.GP16, board.GP17)
last_position = None
while True:
    position = enc.position
    if last_position == None or position != last_position:
        print(position)
    last_position = position

Behavior

Prints initial 0 and then no changes to enc.position after interacting with rotary encoder.

Description

Additional information

I initially thought this was a hardware issue, but scoping it out reveals no problems on 9.2.0-alpha or 9.2.0-beta. I'm not sure of the actual source of this issue, but I may do some additional investigation on my own in the near future.

dhalbert commented 2 weeks ago

This was fixed already: see #9681 and the fix #9682. This will be in the next beta, or you can get an "Absolute Newest" build.

dcooperdalrymple commented 2 weeks ago

Ah, my bad. Thank you for pointing this out!