OK so I started writing a autonomous program for our robot and it cam up as Error:Undefined procedure ‘setMotor’.
what is the first line of autonomous program supposed to be
i am using ROBOTC for VEX® Robotics 4.0
this is the code so far
#pragma config(Motor, port2, leftDrive, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port3, topLift1, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, topLift2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, rightDrive, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port7, bottomLift1, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, bottomLift2, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//
#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include “Vex_Competition_Includes.c”
void pre_auton()
{
}
task autonomous()
{
setMotor(port2,127);
setMotor(port6,127);
delay(1850);
AutonomousCodePlaceholderForTesting();
}
task usercontrol()
{
while(true)
{
int r2=vexRT(Ch2); //drive
int l3=vexRT(Ch3); //drive
motor[rightDrive]=r2;
motor[leftDrive]=l3;
if(vexRT[Btn6D])
{
motor[port3]=127;
motor[port4]=127;
delay(150);
}
else
{
motor[port3]=0;
motor[port4]=0;
}
if(vexRT[Btn6U])
{
motor[port3]=-127;
motor[port4]=-127;
}
else
{
motor[port3]=0;
motor[port4]=0;
}
if(vexRT[Btn5D])
{
motor[port7]=-127;
motor[port8]=-127;
delay(150);
}
else
{
motor[port7]=0;
motor[port8]=0;
}
if (vexRT[Btn5U])
{
motor[port7]=127;
motor[port8]=127;
}
else
{
motor[port7]=0;
motor[port8]=0;
}
}
while (true)
{
}
}