mathertel / RotaryEncoder

RotaryEncoder Arduino Library
Other
328 stars 107 forks source link

Implementation of digitalFASTread() possibility #45

Open JoJos1220 opened 3 months ago

JoJos1220 commented 3 months ago

I wanted to avoid digitalRead()/digitalWrite() operation within my Project. Therefore I made a split-up of the tick() function - to enable the possibility to read the Encoder-State within my loop function and the usage of a digitalFASTread() Operation and overload it to the tick function directly.

JoJos1220 commented 3 months ago

I made successfull Comissioning on ESP32-WROOM by implementing: encoder.tick(digitalFASTRead(encoderPinB), digitalFASTRead(encoderPinA)); Instead of: encoder.tick(); And it worked to me perfectly. My used digitalFASTREAD() function I used is: /*-----------------------------------------------------------------------------