|
Re: Help with Speed control using Cortex and US Digital Encoders
No worries I'm just greatful for the help. So a lot of this makes sense to me now. I am starting to see how this all works.
Now that I have the speed. To make it go a certain distance I would put the PID code into a while loop and this would keep looping until the encoders reach a certain distance kinda like this:
while (SensorValue[leftEncoder] < distance)
{
PID();
}
where PID() is similar to the example code you supplied, and distance is specified by the user. Is this right?
__________________
--Eric
|