Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3989

MicroPython • Re: Rotary Encoder

$
0
0
Looks like you've trid to install Mike Teachman's MicroPython Rotary Encoder Driver library but missed out some of the files. You need to have rotary.py and at least rotary_irq_rp2.py on your board.

Unfortunately, Thonny can't find the package. The official way to install this MicroPython library is

Code:

mpremote mip install github:miketeachman/micropython-rotary
but that requires installing mpremote, which itself isn't easy to install. Maybe it's easiest to download the whole project as a zip file and copy the .py files onto your Pico. That way, you get a known-good copy of the library plus the example you were trying to post.

Don't get put off that you couldn't get an encoder working with your own code. It's one of those surprisingly hard programming problems that crop up far too often.

Statistics: Posted by scruss — Tue Mar 19, 2024 8:49 pm



Viewing all articles
Browse latest Browse all 3989

Trending Articles