Program 6 (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, 75)
waitHereWhile abs(encoderValue(B)) <50*inches
}
function moveBackward(inches) {
resetEncoder(B)
syncMotors(B,C, -50)
waitHereWhile abs(encoderValue(B)) <50*inches
}
function liftWall(power){
setMotor(A,power)
sleep (2000)
}
function dish(){
moveForward(25)
stopAllMotors()
sleep(1000)
liftWall(40)
stopAllMotors()
// sleep(2000)
moveBackward(40)
}
dish()