This is where the problem lies. Let's look at it step by step.
1) First we clear the encoders assigning 0 values to the left and right encoders. No problem here.
2) Next, we want to keep running the loop while the value of the right encoder is less
than 720. We've used this before, so it should work here as well, right?
3) Finally, we keep our motors moving at a power level of negative
95 until the encoder counts reach a positive
Remember, when you turn on your motors on in a negative direction, the encoders will count in a negative direction. So if you start with an encoder count of zero, and start counting in a negative direction from there, when will you reach the positive 720 value?
Now that we know what the problem is, how can we fix this?
Check out our Blog
! And our Facebook page
Need help? Take a look at our updated help documentation
and the ROBOTC Forums.