Below is the code we are using in teleop to raise and lower an arm. It works, however, now the other buttons do not work. We thought the remote would default to the standard button commands? Do I have to reprogram the entire remote or is there something I can do? This is our first time to program the remote and it is proving a challenge.
#pragma config(Sensor, port2, gyroSensor, sensorVexIQ_Gyro)
#pragma config(Sensor, port3, colorSensorLeft, sensorVexIQ_ColorGrayscale)
#pragma config(Motor, motor1, leftMotor, tmotorVexIQ, openLoop, driveLeft, encoder)
#pragma config(Motor, motor5, middleMotor, tmotorVexIQ, PIDControl, encoder)
#pragma config(Motor, motor6, rightMotor, tmotorVexIQ, openLoop, reversed, driveRight, encoder)
#pragma config(Motor, motor11, elelift, tmotorVexIQ, PIDControl, encoder)
//YOU HAVE TO START THE ROBOT AT WALL LEVEL
task main()
{
while(true)
{
if(getJoystickValue(BtnFUp)) //F Button up the basket goes up to post level -
{
setMotorTarget(motor11,2000,75); //highest height of basket it will get on the post 2000 is the highest
}
else if (getJoystickValue(BtnFDown)) //when you push F Button down the basket goes down to solid color level
setMotorTarget(motor11,-2000,75); //lowest basket to get on low one color posts
}
setMotorSpeed(motor11,0);
if (getJoystickValue(BtnLUp))
setMotorSpeed(motor5,10);
else
setMotorSpeed(motor5,0);
if (getJoystickValue(BtnRUp))
setMotorSpeed(motor5,100);
}