Learning Center
Plans & pricing Sign in
Sign Out

easyC Screen Shot



BEST/VEX Controller

                 Cowtown BEST 2010
                    David Kwast

      BEST/VEX Controller Overview Outline
• Features
• LED Status Lights
• Default Program
• Programming
• Joystick Calibration
• Other Stuff

                VEXnet System Features

                                  • (2) X-Y Joysticks
                                  • (12) Buttons
                                  • (2) accelerometer outputs
                                  • powered by AAA batteries
• ARM Cortex CPU
• programmable
• WiFi radio communications
• (10) motor/servo outputs
• (12) digital inputs/outputs
• (8) analog inputs
• speaker output
• various serial interfaces
• built-in resettable fuse

                    Cortex Controller Features
                                                 WiFi 802.11
                                                 proprietary comm
                    USB port

                                                      standard serial
                1                                      (UART, I2C)
                1                                 1 2-wire motor
  digital                                         2
  in/out                                                3-wire PWM
                                                       servo/motor ctrl
            12                                    9
   out       SP                                   10 2-wire motor

system status

                     Cortex Controller Features

configuration switch (used        75MHz crystal interface
 for special procedures)          ports (not used by BEST)
                                                                 On/Off switch

                                                main battery port (7.2V)
          backup battery port for
         WiFi communications (9V)

                    Cortex Controller Pinouts

+ 5V
+ Battery Power
+ Battery Power
 (for + control input)
+ Battery Power
 (for – control input)

                        Joystick Features
                                        (8) buttons on top

                                        (2) X-Y analog joysticks

                                        interface for competition cable     X tilt and Y tilt
                                              (not used by BEST)            accelerometer
                                          On/Off switch

plug-in USB/ WiFi key

        (4) buttons on front-side

    partner/buddy control support                               (6) AAA
         (not used by BEST)                                  rechargeable
                                         interface for         batteries
                                      programming cable

                       LED Status Lights
                                                 Joystick battery status

                                                 Robot battery status

                                                 comm. (VEXnet) link status

                                                        Game status (not
                                                        used by BEST)

• Green battery – good charge        • Green VEXnet – comm. established
• Yellow battery – dying             • Yellow VEXnet – searching
• Red battery – dead                 • Lights on the Controller and the
                                     Joystick are the same

          BEST Default Cortex Controller Program
The preloaded BEST default program will allow “out of the
box” functionality without doing any programming. The
default program is as follows:
           Motor Port 1: Arcade right hand side motor.
           Motor Port 2: Controlled by Stick 1 (with limits available).
           Motor Port 3: Controlled by Stick 2 (with limits available).
           Motor Port 4: Controlled by Stick 3 (with limits available).
           Motor Port 5: Controlled by Stick 4 (with limits available).
           Motor Port 6: Controlled by Stick 3.
           Motor Port 7: Controlled by Stick 3 (inversed).
           Motor Port 8: Controlled by Stick 4.
           Motor Port 9: Controlled by Stick 4 (inversed).
           Motor Port 10: Arcade left hand side motor.

           Arcade forward/reverse is Stick 2 and rotate left/right is Stick 1.

           Digital Input 1: Positive limit for Motor Port 2.
           Digital Input 2: Negative limit for Motor Port 2.
           Digital Input 3: Positive limit for Motor Port 3.
           Digital Input 4: Negative limit for Motor Port 3.
           Digital Input 5: Positive limit for Motor Port 4.
           Digital Input 6: Negative limit for Motor Port 4.
           Digital Input 7: Positive limit for Motor Port 5.
           Digital Input 8: Negative limit for Motor Port 5.

            Programming the Cortex Controller

• Three different programming environments available
   – easyC
   – RobotC
   – Mathworks MATLAB/SIMULINK
• easyC is a block programming environment (similar to
  software for Lego Mindstorms)
• RobotC programs in C with a text editor, but it has
  runtime debugging (can step through program line by
  line and see what the results are)
• SIMULINK is graphical programming/modeling
  environment with simulation capability (see what your
  program will do before you download it to the Cortex,
  requires easyC to download to robot)

                       Programming Steps

• Create a program
• Download to the Cortex controller
   – with the programming cable
      • support the robot such that it can zoom off
      • with USB link, only controller needs to be switched on
      • with WiFi link, both controller and joystick must be switched on
   – with a USB cable
      • controller should be switched off

                           Downloading Program
optional programming cable with WiFi link               optional programming cable with USB link

                                            USB cable

                                    Joystick Calibration
• If the motors hum or creep (sticks not returning to zero),
  the joystick may need to be recalibrated
• Calibration procedure (as extracted from the easyC help
  1) The Joystick must be "Linked" to the Cortex Microcontroller using the VEXnet Keys.
  2) Hold the "6U" Back Switch depressed.
  3) While the "6U" Back Switch is depressed, use a small Allen Wrench (1/16" or smaller) or similar small
       straight tool to depress and hold the CONFIG Switch.
  4) Hold both Switches depressed until you see the Joystick LED Flash RED and GREEN - you can now release
       both Switches.
  a. There is a 10 second time limit to complete the following steps 5 and 6.
  5) Now move both Joystick Pots to the maximum position desired in all 4 directions - Up, Back, Left, and Right.
  a. If a movement is not detected in all 4 directions, a timeout will occur after about 10 seconds and the Cal
       Mode will be discontinued and the VEXnet LED will briefly Flash Red.
  b. The Joystick LED will continue to Flash RED and GREEN during the calibration process.
  6) After movement is detected in all 4 directions, the Joystick LED will be ON and Solid GREEN.
  a. To "Save" the Calibration, depress and release the "8U" Top Switch Button.
  b. If the calibration is accepted and Saved, the Joystick LED will start Flashing Fast GREEN for a few seconds.
  c. If the Calibration is not Saved, a timeout will occur after about 10 seconds and the Cal Mode will be
       discontinued and the VEXnet LED will briefly Flash Red.
  d. To cancel a calibration, depress and release the "7U" Top Switch Button. The Cal Mode will be discontinued
       and the VEXnet LED will briefly Flash Red.
  e. If the Cal Mode is discontinued or saved, the Joystick LEDs will resume their normal function after the
       VEXnet LED briefly Flashes.

                             Other Stuff

• If the WiFi fails to establish a connection
   –   turn off both units
   –   remove WiFi keys and connect the units with a USB cable
   –   turn both units on
   –   link should be established within one minute
   –   turn both units off
   –   remove the USB cable and put the WiFi keys back in
   –   turn both units on
   –   WiFi link should be established in about 10 to 15 seconds

   Other Stuff

Other Stuff (Simulink screen shot)

                       Other Stuff (Links)
• Cowtown BEST
   – Today’s training files will be posted here later
• Old BEST site (files are here)
   – 2010 BEST training
• New BEST site

• easyC software
• easyC web training

• RobotC software
• RobotC web training

• Simulink web training

To top