Re: Encoders are Inaccurate?
Don't know what you meant by acting up and have to tweak it again, but your algorithm is not accurate to start with. First, you only reset the right encoder at the beginning, but you did not reset the left one. Secondly, even if you applied equal power to both wheels, the wheels are not running at the same rate, so your robot will probably not going straight and will most likely overshoot because you won't stop until both encoders traveled at least x inches. You may consider using some of the RobotC bult-in facilities such as Sync the wheels or even PID control drive. There are many threads about this in this forum. You can search for them.