mathertel / RotaryEncoder

RotaryEncoder Arduino Library
Other
328 stars 107 forks source link

AcceleratedRotator example seems to be wrong #24

Closed Danixu closed 3 years ago

Danixu commented 3 years ago

Hello,

I've tried the AcceleratedRotator.ino example becase I want to use it on a project I'm doing, and I've noticed that is not working.

The variable lastMovementDirection is not updated, so the acceleration will never trigger.

Best regards.

giupo commented 3 years ago

Same here, it's enough to add the following statement by the end of the loop

lastMovementDirection = currentDirection