I am struggling to get my autonomous program working. In my autonomous, I have the line ‘motor_11.spin(REVERSE, 10.0, VOLT)’ I have used ‘spin_for(FORWARD, 1000.0, DEGREES),’ and PERCENT in place of volt. These have not worked. Motor 11, which is my intake does not spin. This is strange because driver control works for spinning motor 11. Here is some of my code;
def autonomous():
global motor_11
calibrate_drivetrain()
drivetrain.set_drive_velocity(25,PERCENT)
drivetrain.set_turn_velocity(25, PERCENT)
drivetrain.drive_for(FORWARD, 50, MM)
motor_12.spin_for(FORWARD,200, DEGREES)
drivetrain.drive_for(REVERSE, 100, MM)
motor_group_1.spin(REVERSE, 90, PERCENT)
drivetrain.turn_for(RIGHT, 2, DEGREES)
wait(1, SECONDS)
motor_11.spin_for(FORWARD, 5000.0, DEGREES)
wait(3, SECONDS)
motor_11.stop()
motor_group_1.stop()
The section for turning intake in driver control;
if controller_1.buttonR1.pressing():
motor_11.spin(FORWARD, 50.0, PERCENT)
elif controller_1.buttonR2.pressing():
motor_11.spin(REVERSE, 50.0, PERCENT)
elif not(controller_1.buttonR1.pressing()) and not(controller_1.buttonR2.pressing()):
motor_11.stop()