Rotary encoder PID control Serial delay?

Hey guys,

I am trying to perform PID control on some continuous rotation servos using some mechanical rotary encoders. I am able to control the speed of the servo and get feedback from the encoders, but it is clear that the encoders either have too low of a resolution (3 degrees/tick) or I am causing a delay in my code. Basically, when I run with no feedback control at 100Hz, I'll get something like 0, 0, 0, 6, 0, 0, 3, 0, 0, 4 or something like that. I am using Serial.print which can supposedly cause delays, so should I try using EEPROM to store the data instead? Maybe that will allow for quicker encoder updates?

Thanks for your help

or I am causing a delay in my code.

I don't see it as an either/or situation. Both is more likely. However no code == no answers.

Basically, when I run with no feedback control at 100Hz, I'll get something like 0, 0, 0, 6, 0, 0, 3, 0, 0, 4 or something like that.

What do those values mean?

I am using Serial.print which can supposedly cause delays,

Serial.print() is for debugging. Once you know the code works, stop printing() (and delaying).