Auton not working

      SuckL.spin(directionType::fwd, -100, velocityUnits::rpm);
      SuckR.spin(directionType::rev, -100, velocityUnits::rpm);
     
      Tray.spin(directionType::fwd, -100, velocityUnits::rpm);
      
      vex::task::sleep(3000);
      Tray.spin(directionType::fwd, 100, velocityUnits::rpm);
      vex::task::sleep(1000);

all of this works… until I added the sleep function. What is the problem?

I’m assuming your problem is that everything keeps on running? Using task::sleep doesn’t turn off the motor it only adds a delay. If you want the motor to stop use SuckL.stop().

1 Like

Ok so this is on our autonomous, and we want to keep the program going for 1 second.

So after the 1 second, turn off all the motors by doing
SuckL.stop();
SuckR.stop();
Tray.stop();

1 Like