Broken robot?????/confused programer

help.!! i was trying to program the 6B robot when it decided to be mean. it IS programed but nothing work. weve tried differnt cotrolers ,didnt work. tried diffrent progam didnt work. whats wrong.when i program it no matter what i press the motor values dont change.Yes ports are correct, already checked that.
HELP!!!

Post your code so people can see what is wrong. My best guess is that you forgot to put the program in a while loop, so it ends before you have a chance to press anything.

i checked that but okay

#define SPEED_FORWARD_FULL (127)
#define SPEED_STOP (0)
#define SPEED_REVERSE_FULL (-127)
#define BUTTON_PRESSED (1)
#define ARM_RAISE_FULL (127)
#define ARM_LOWER_FULL (-127)
#define ARM_RAISE_THREEQUARTER (90)
#define ARM_LOWER_THREEQUARTER (-90)
#define TREAD_INTAKE_FULL (127)
#define TREAD_EJECT_FULL (-127)

#include “Vex_Competition_Includes.c” //Main competition background code…do not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
// Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////

void pre_auton()
{

// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, ...

}

/////////////////////////////////////////////////////////////////////////////////////////
//
// Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{
}

/////////////////////////////////////////////////////////////////////////////////////////
//
// User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
motor[rightMotor] = vexRT(Ch2);
motor[leftMotor] = vexRT(Ch3);

//*************************************************************************************************************

//********************************************************************************

// Arm Control
if(vexRT[Btn5U] == 1)//if button 6U is pressed the flap will go up
{
motor[rightArm] = ARM_RAISE_FULL;
motor[leftArm] = ARM_RAISE_FULL;
}
else
if(vexRT[Btn5D] == 1)
{
motor[rightArm] = ARM_LOWER_FULL;
motor[leftArm] = ARM_LOWER_FULL;
}
else
{
motor[rightArm] = SPEED_STOP;
motor[leftArm] = SPEED_STOP;
}

//!!!
//Intake####################################################################
if(vexRT[Btn6U] == 1)//if button 6U is pressed the flap will go up
{
motor[RightRoller] = ARM_RAISE_FULL;
motor[LeftRoller] = ARM_RAISE_FULL;
}
else
if(vexRT[Btn6D] == 1)
{
motor[RightRoller] = ARM_LOWER_FULL;
motor[LeftRoller] = ARM_LOWER_FULL; // …activate the solenoid.
}
else
{
motor[RightRoller] = SPEED_STOP;
motor[LeftRoller] = SPEED_STOP; // …activate the solenoid.
}

}

Umm okay, but I see no while loops in that code, so you might want to check again. :stuck_out_tongue:

As Owen said, you need a forever loop around all the code in user control.

task usercontrol()
{
    while(1)
        {
        motor[rightMotor] = vexRT(Ch2);
        motor[leftMotor] = vexRT(Ch3);


        //snip

        // don't hog the cpu
        wait1Msec(20);
       }
}

i checked the code itook parts from and saw the problem. i forgot toadd that because i went from mecunum wheel to normal wheel program so i forgot all about it .Thanks:)