Your problem is almost certainly the motor safety. A tenth of a second after you enter the inner While loop, the drive motors will shut off because they're not being commanded. Moving the first Tank Drive inside the loop should correct that.
Quote:
Originally Posted by bumblebee3339
3. I dont write to the same motor at one time. on the left I give both the same value and on the right the upper controls the left motor and the lower controls the right motor. Is it still might be connected to the problem?
|
It's not connected to the problem you're working on right now, but it still is a problem. Tank Drive doesn't control individual motors. For example, if you don't connect anything to the Left input, it assumes a value of 0 and stops the motor anyway.
If you want to do things the way it looks like you're trying to, then you should have only a single inner While loop instead of the two parallel ones. Inside that loop, set the Left input to Tank Drive to either .5 or 0 depending on whether the left encoder has reached its target. Simultaneously set the Right input to either .5 or 0 depending on whether the right encoder has reached its target. If both encoders are at or above their set point, exit the While loop.