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

Add pio-based IncrementalEncoder on pi5 #940

Open
jepler opened this issue Feb 7, 2025 · 3 comments
Open

Add pio-based IncrementalEncoder on pi5 #940

jepler opened this issue Feb 7, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@jepler
Copy link
Member

jepler commented Feb 7, 2025

In rp1pio there is an example of using the pio peripheral to implement quadrature counting that doesn't require any CPU time.

We would like to see this code adapted into Adafruit_Blinka, and used instead of the thread-based implementation added in #937 when appropriate.

Benefits/limitations:

  • uses the pio peripheral, which means no CPU time is required between polls
  • very high polling rates above 1MHz can be used.
  • Can count up to +-2 billion counts (full 32 bit signed counter)
  • up to 4 encoders can be connected in this way (3 if neopixel is used)
  • encoder pins for one knob must be adjacent
  • only works on pi5 and only when rp1pio is installed and properly configured
@jepler jepler added the enhancement New feature or request label Feb 7, 2025
@jepler
Copy link
Member Author

jepler commented Feb 7, 2025

ping @ladyada @makermelissa

@ladyada
Copy link
Member

ladyada commented Feb 7, 2025

neat 🎛️

@makermelissa
Copy link
Collaborator

Awesome, I'll take a look and see if I can get that going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants