So I’m working on PID and I have all the functions down, but I’m trying to figure out how to make the code run. Here is a sample of my code
void autonomous(void) {
//turn on the PID
vex::task WhateverSomethingRandom(driverPID);
//move the back lift down and then back up
HeroLift.spin(forward, 100, pct);
wait(1.2, seconds);
HeroLift.stop(coast);
HeroLift.spin(reverse, 100, pct);
wait(1.1, seconds);
HeroLift.stop(hold);
vex::task::sleep(200);
//turn to the right
resetDriveSensors = true;
DesiredTurnValue = 180;
vex::task::sleep(200);
//move forward 36 inches
resetDriveSensors = true;
DesiredValue = 2057;
vex::task::sleep(200);
I’m just checking to see if this is how I make my motors actually turn the way I want them too or if I have to write it in a different way. If you can help please just respond to this. (All of these values are in degrees)