diff --git a/ino/motor_encoder_poc/motor_encoder_poc.ino b/ino/motor_encoder_poc/motor_encoder_poc.ino index 8f3ff49..d180022 100644 --- a/ino/motor_encoder_poc/motor_encoder_poc.ino +++ b/ino/motor_encoder_poc/motor_encoder_poc.ino @@ -87,7 +87,7 @@ void loop() { } rotations = (int) floor((float) pos / (float) maxPulses); - if (pos != lastRotationPosition) { + if (rotations != lastRotationPosition) { lastRotationPosition = rotations; frames = rotations * framesPerRotation;