Encoder inputs #172
-
Just a curious, yet. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 20 replies
-
I've tried it but it takes more lines of code, more complex and still uses interrupts internally because even hardware pulse counter ignores pulses during the time we're saving preferences. Not sure what the benefit is there. |
Beta Was this translation helpful? Give feedback.
-
Since I also have problems with the encoder, I would like to try your solution with the PCNT library, but I don't have a DRO. Regards, |
Beta Was this translation helpful? Give feedback.
-
I've tried using PCNT but I'm getting confusing results. Turning the spindle exactly 1 turn yields a weird number of impulses - something like 9/10 or 9/20 of the expected - 161 or 342 degrees depending on how I multiply the encoder PPR - instead of 360 degrees. Here are the main changes:
|
Beta Was this translation helpful? Give feedback.
-
Turned out using ESP32 PCNT really helps in some situations where extra pulses are detected - in the latest software version 12 we've switched to it. Huge thanks to @vegetate7 and @duebelpapst 🎉 |
Beta Was this translation helpful? Give feedback.
-
BTW, updated my branch to interruptless PULSE1/PULSE2 counters and DRO. |
Beta Was this translation helpful? Give feedback.
Turned out using ESP32 PCNT really helps in some situations where extra pulses are detected - in the latest software version 12 we've switched to it. Huge thanks to @vegetate7 and @duebelpapst 🎉