hello! i have a question on how to make my robot turn left using the gyro. i have the code to make it turn right using the gyro but im having trouble making it turn the other way .
here is my code im using robotc
//Completely clear out any previous sensor readings by setting the port to "sensorNone"
SensorType[in8] = sensorNone;
//Reconfigure Analog Port 8 as a Gyro sensor and allow time for ROBOTC to calibrate it
SensorType[in8] = sensorGyro;
//Adjust SensorScale to correct the scaling for your gyro
//SensorScale[in8] = 260;
//Adjust SensorFullCount to set the "rollover" point. A value of 3600 sets the rollover point to +/-3600
//SensorFullCount[in8] = 3600;
//Specify the number of degrees for the robot to turn (1 degree = 10, or 900 = 90 degrees)
//change degrees 10 = 1 degree
int degrees10 = 900;
//While the absolute value of the gyro is less than the desired rotation...
while(abs(SensorValue[in8]) < degrees10)
motor[rightMotor] = 50;
motor[leftMotor] = -50;
//Brief brake to stop some drift
motor[rightMotor] = -5;
motor[leftMotor] = 5;