Volt Drive
Volt Drive
the drive Function
void DriveVolts(double lspeed, double rspeed, double multiplier, int wt) { lspeed=lspeed*120*multiplier; rspeed=rspeed*120*multiplier; LeftFront.spin(forward,lspeed,voltageUnits::mV); LeftMiddle.spin(forward,lspeed,voltageUnits::mV); LeftBack.spin(forward,lspeed,voltageUnits::mV); RightFront.spin(forward,rspeed,voltageUnits::mV); RightMiddle.spin(forward,rspeed,voltageUnits::mV); RightBack.spin(forward,rspeed,voltageUnits::mV); task::sleep(wt); }
for HandLoading
if(catDown==true){ CatapultL.spin(forward, 0, pct); CatapultR.spin(forward, 0, pct); } else{ CatapultL.spin(forward, catspeed, pct); CatapultR.spin(forward, catspeed, pct); DriveVolts(-10, -10, 1, 200); }
Back to the course
Lessons
Lesson 4: Fasteners and Tools
60 Minutes
Design Rules
60 Minutes