Hi. I used to code on VCS but I learned that vcs is discontinued. I tried to import my code to VEXcode but It doesn’t work
#include"robot-config.cpp"
int main()
{
while(true)
{
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
while(Controller1.ButtonUp.pressing())
{
axMotor.spin (rev,50,::rpm);
bxMotor.spin (rev,50,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
while(Controller1.ButtonDown.pressing())
{
axMotor.spin (fwd,50,::rpm);
bxMotor.spin (fwd,50,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
bxMotor.stop();
axMotor.stop();
while(Controller1.ButtonX.pressing())
{
cxMotor.spin (fwd,1000,::rpm);
dxMotor.spin (fwd,1000,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
while(Controller1.ButtonY.pressing())
{
cxMotor.spin (rev,1000,::rpm);
dxMotor.spin (rev,1000,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
cxMotor.stop();
dxMotor.stop();
while(Controller1.ButtonLeft.pressing())
{
xxMotor.spin (fwd,60,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
xxMotor.stop();
while(Controller1.ButtonRight.pressing())
{
xxMotor.spin (rev,60,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
xxMotor.stop();
while(Controller1.ButtonY.pressing())
{
cxMotor.spin (rev,30,::rpm);
dxMotor.spin (rev,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
cxMotor.stop();
dxMotor.stop();
while(Controller1.ButtonL1.pressing())
{
cxMotor.spin (rev,30,::rpm);
dxMotor.spin (rev,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
while(Controller1.ButtonL2.pressing())
{
cxMotor.spin (fwd,30,::rpm);
dxMotor.spin (fwd,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2); //(Axis3+Axis4)/2);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2);//(Axis3-Axis4)/2);
oxMotor.spin (fwd, (Controller1.Axis1.value()));
}
while(Controller1.ButtonR1.pressing())
{
cxMotor.spin (rev,30,::rpm);
dxMotor.spin (rev,30,::rpm);
xxMotor.spin (rev,60,::rpm);
}
while(Controller1.ButtonR2.pressing())
{
cxMotor.spin (fwd,30,::rpm);
dxMotor.spin (fwd,30,::rpm);
xxMotor.spin (fwd,60,::rpm);
}
}
}
It says that “No matching member function for call to ‘spin’”