miketeachman / micropython-rotary

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

Add async support #8

Closed john-yan closed 3 years ago

john-yan commented 3 years ago

Add async support for value change. No need to pull value every few ms.

Drive-by: use autopep8 to format the code.

john-yan commented 3 years ago

Hello Mike, thanks for all your time reviewing my code. This is just my personal pet project, so go easy on all the legal stuff. I will agree with whatever makes easier for you. :)

miketeachman commented 3 years ago

thanks Junliang. I think it will be easiest to merge your changes, then make the changes that I suggested in a separate commit.

miketeachman commented 3 years ago

Hi Junliang,

I merged your PR, then updated the example as discussed, and added the remove_listener() method. If you see anything you don't like please let me know.

thanks again for your contribution !

Mike