RoboCatz.com

Program 7 (Fall 2022)


The code below is a set of functions, variables, constants, and algorithms that are the work of RoboCatz for the Fall 2022 season.

function moveForward(inches)  {
	resetEncoder(B) 
	syncMotors(B,C, 50)
	waitHereWhile  abs(encoderValue(B)) <50*inches
	//stopAllMotors()
}
function moveBackward(inches)  {
	resetEncoder(B) 
	syncMotors(B,C, -35)
	waitHereWhile  abs(encoderValue(B)) <50*inches
	//stopAllMotors()
}
function turnLeft()   {
	//resetGyroSensor()
	gyroTarget+=30
	syncMotors( B, C, 30, -100 )
	waitHereWhile  abs(gyroSensorValue())