Help with programming vex micro controller

we needed help with programming the micro controller to run with out a transmitter. We wanted to attach a limit switch to run the program

please read the inventors guide and the programming guide, it should explain everything

we found the part that talks about autonomous functions, but we cannot find a way to be able to not have the transmitter or transceiver attached to the hub

Did you place the jumper clip in port 13 to enable autonomous mode? If so, the robot should drive forward until one of the front bumper switches is pressed, then it should back up and try to avoid the obstacle.

Pages 5.12 & 7.16 tell you which ports to use for what in autonomous mode

Any other autonomous behavior requires custom programming. For that, you need the programming kit which includes software for your PC where you write the program, and an orange download cable that you use to get the code into you Vex controller.


  • Dean

Read the EasyC tutorials and the Inventors Guide.

You can’t do that using EasyC.

Here’s how to do it with MPLAB:

What your looking for is not in the actual autonomous function.

In file “user_routines.c”:

void User_Initialization(void)

//The initialization stuff -- omitted for conciseness

/* Add any other user initialization code here. */

  Putdata(&txdata);             /* DO NOT CHANGE! */
  User_Proc_Is_Ready();         /* DO NOT CHANGE! - last line of User_Initialization */

    statusflag.NEW_SPI_DATA = 1;
  /* This code receives the 1st packet from master to obtain the version # */
  while (!statusflag.NEW_SPI_DATA);  /* Wait for 1st packet from master */
  printf("VEX - Master v%d, User v%d\n",(int)rxdata.master_version,(int)CODE_VERSION);        

Comment-out the line that reads:

while (!statusflag.NEW_SPI_DATA);  /* Wait for 1st packet from master */

And add the line (under the commented-out line, but before "Getdata(&rxdata);):

txdata.user_cmd = 0x02;       /* Tell master you want to be in auton mode. */

The autonomous function will now run without the transmitter.

Wow underdark, and excellent and definitive reply!

It never occurred to me that the controller requires the presence of a radio link even for autonomous mode.

Seems like Vex should update the documentation to mention this, or just fix the default code to allow Rx-free autonomous mode.


  • Dean

Just for kicks, I tried autonomous mode (Jumper in port 13) with no Rx attached and it worked just fine. Nothing was attached to the Vex controller except the battery and the motors/sensors.

I’m not running any custom code, though I did just recently upgrade the master code to v7 if that makes a difference.

Am I misunderstanding what you mean by “autonomous mode”?


  • Dean