ESP32-S3 read encoder and get difference from last reading

Windorey
Posts: 3
Joined: Thu Mar 16, 2023 9:19 pm

ESP32-S3 read encoder and get difference from last reading

Postby Windorey » Mon Dec 04, 2023 9:49 pm

Hello, I am trying to make a code that will read the difference of the rotarty encoder from when it was last read with PCNT peripheral.

For example, if I turn it 3 times anticlockwise after the last read, the next read will show -3, and if I have not touched it since the last read, it will be 0.

I have tried the PCNT rotary encoder example, but I do not understand how it works and I am getting the count doubled.

Any help would be greatly appreciated.

Who is online

Users browsing this forum: bfredo123, Majestic-12 [Bot] and 92 guests