adafruit / circuitpython

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

Rotary encoder support #283

Closed tannewt closed 6 years ago

tannewt commented 7 years ago

SAMD51 has a peripheral for it.

sommersoft commented 6 years ago

Just wanted to make some notes here. I was skimming through Noridc documentation, and noticed that nRF52x also has rotary encoder as a peripheral. Not surprising, since it's M4 based.

They refer to it as "Quadrature decoder" or "QDEC". Here are links to the documentation:

microbuilder commented 6 years ago

The Arduino nRF52 Repo contains a RotaryEncoder library with both HW and SW implementations for this, just as a reference. If a common API is added at the HAL layer, it shouldn't be too complicated to add nRF52 support used the QDEC peripheral or GPIO.

ladyada commented 6 years ago

making a note here that SAMD has very fixed pins for QDEC - so for that platform, at least, we should just DIY with a timer interrupt - an existing one would probably be fine as the checking code is very small

tannewt commented 6 years ago

Anyone mind if I punt this to 4.0?