Example for working with a rotary encoder?

Hi,

I was trying to compile actual version of MPY with DEC and here is patch for machine_dec.c to work with actual version of MPY: machine_dec.c.txt (863 Bytes)

It is classic patch file, txt extension is because of limitations of forum. Usage is common:

$ cd $MPY_SOURCE/ports/esp32/ 
$ cat machine_dec.c.txt | patch

@sengp, I have a question - is it possible to create pull request with pulse count units support to Micropython? It would be a shame if support for this cool feature of ESP32 was not part of Micropython. I have a patch working with actual version of mpy, so I can help with it, if you are interested…

Hi,

this sample is far from complete but it works

encoder.txt (2.5 KB)

Recently started woek with rotary encoder

I am trying to compile machine_dec.c with micropython.

Do i have to follow steps 4 and 5? Because @mhepp does not.(with his patch)