just use the system
just use the system
You want to use a conditional statement (if) or a while loop and then use maybe a gyroscope to track the number of degrees. Remember, the number of degrees is equal to the value of the gyroscope / 10. For example, a value of 900 = 90 degrees. If you don’t have a gyroscope, I’m not sure how you would calculate the number of degrees with an encoder, but I’m sure someone else will be able to give you the formula. If you need more help with the programming itself, just post and I’ll be glad to post some basic code for this.
Depending on the type of sensory that you have, you’re gonna wanna use an if() statement with a while() statement embedded within to define a button press in the usercontrol task. It’ll look something like this:
if(vexRT[Btn8U] == 1)
{
while(SensorValue[SensorName] < (requiredValue)
{
motor[turning1] = 127;
motor[turning2] = -127;
}
}
replace my variables with actual names of stuff, but that is a basic outline of what you might wanna have.