miketeachman / micropython-rotary

MicroPython module to read a rotary encoder.
MIT License
269 stars 56 forks source link

needs pull-up #6

Closed aa2mz closed 3 years ago

aa2mz commented 3 years ago

Thank you , great work! My (cheap, 2 pin,24 count) encoders need a pull up to work. I did the pull-up before calling the routine and that stays set as long as the class'es Pin creation doesn't change it internally. (It doesn't currently.) Obviously must work without it in many cases so if you don't want to change it in the class, maybe just a note in the example? Thank's again!

investigatronica commented 3 years ago

like a charm

miketeachman commented 3 years ago

I added a new constructor argument to handle encoder hardware that does not include pull-up resistors on CLK and DT Commit: https://github.com/miketeachman/micropython-rotary/commit/b5f2455b4841e8e7ad36706b6aaab28c8bba6104 Hopefully this change solves the issue @aa2mz Can I trouble you to see if this commit works with your encoder hardware? No rush. Thanks!