Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotaryio library doesn't work on RP2350 #9681

Closed
D3Fq opened this issue Oct 3, 2024 · 3 comments · Fixed by #9682
Closed

rotaryio library doesn't work on RP2350 #9681

D3Fq opened this issue Oct 3, 2024 · 3 comments · Fixed by #9682
Milestone

Comments

@D3Fq
Copy link

D3Fq commented Oct 3, 2024

CircuitPython version

CircuitPython 9.2.0-beta.0 on 2024-09-17; Raspberry Pi Pico 2 with rp2350a
CircuitPython 9.2.0-beta.0-15-gca25c602a8 on 2024-09-27; Raspberry Pi Pico 2 with rp2350a
CircuitPython 9.2.0-beta.0-16-gec5cca6983 on 2024-09-27; Raspberry Pi Pico 2 with rp2350a

Code/REPL

import rotaryio
import board

encoder = rotaryio.IncrementalEncoder(board.GP15, board.GP14)
last_position = None
while True:
    position = encoder.position
    if last_position is None or position != last_position:
        print(position)
    last_position = position

Behavior

Terminal returns 0 value once and doesn't increment another during encoder rotation.

Description

I tested this code on 3 different Circuitpyton versions of v9.2.0-beta.0 on RP2350 with the same result. I also checked voltages on Pico2 inputs by oscilloscope and HIGH/LOW states seems to look fine.

This code run on RP2040 with CircuitPython 9.2.0-beta.0 works correctly.

A bug shouldn't be related to RP2350 Errata E9 issue, because rotaryio use pull-ups on inputs.

Additional information

No response

@jepler
Copy link
Member

jepler commented Oct 3, 2024

If you can test with a build artifact from #9682 (should be ready in an hour or less), it'd be appreciated! I had also encountered the bug & fixed it, but apparently neglected to make a PR. Thanks for the report!

@dhalbert dhalbert added this to the 9.2.0 milestone Oct 4, 2024
@D3Fq
Copy link
Author

D3Fq commented Oct 4, 2024

If you can test with a build artifact from #9682 (should be ready in an hour or less), it'd be appreciated! I had also encountered the bug & fixed it, but apparently neglected to make a PR. Thanks for the report!

Yes, I've just tested 9.2.0-beta.0-23-g11d4bce481 and can confirm it's work fine on RP2350.

@jepler @dhalbert Many thanks!

@jepler
Copy link
Member

jepler commented Oct 5, 2024

You're welcome, and thanks again for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants