rotary encoder glitch in arduino

239 views Asked by At

I hope you can help me with this arduino problem.

I have a rotary encoder hooked up to a servo, and want to achieve that linear relationship of low speed = low angle and high speed = high angle;

It is generally working, this is snapshot from my serial monitor:

spd = 0

input angle = 0

.

spd = 2863304

input angle = 7023

.

spd = 34

input angle = 10

.

spd = 0

input angle = 0

.

My concern here is that sudden jump to a number such as 2863304, it happens frequently, I'm thinking it is a glitch and I wish to remove it, I would very appreciate it if someone can provide some advice!

0

There are 0 answers