I’m trying to figure out how to program my intake to run for a certain amount of time (for autonomous) yet I keep running into issues like the intake running indefinitely. If anyone can help me out I would appreciate it!!
This is my program:
void Intake(int time){
LeftClaw.spin(directionType::fwd,60,percentUnits::pct);
RightClaw.spin(directionType::fwd,60,percentUnits::pct);
task::sleep(uint32_t(time));
LeftClaw.stop(brakeType::hold);
RightClaw.stop(hold);