Docstoc

easyC Screen Shot

Document Sample
easyC Screen Shot Powered By Docstoc
					     4/17/2011




BEST/VEX Controller
    Overview




                 Cowtown BEST 2010
                    David Kwast
                  4/17/2011



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



                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
                               4/17/2011



                    Cortex Controller Features
                                                 WiFi 802.11
                                                 proprietary comm
                    USB port

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




system status
  indicators
                             4/17/2011




                     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)
                         4/17/2011


                    Cortex Controller Pinouts


Ground
+ 5V
Signal/Control
+ Battery Power
+ Battery Power
 (for + control input)
+ Battery Power
 (for – control input)
                          4/17/2011


                        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
                                                                                 output
                                          On/Off switch

plug-in USB/ WiFi key
    (underneath)




        (4) buttons on front-side

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


                       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
                              4/17/2011


          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.
                     4/17/2011




            Programming the Cortex Controller

• Three different programming environments available
   – easyC http://www.intelitekdownloads.com/easyCV4
   – RobotC http://www.robotc.net/download/cortex
   – Mathworks MATLAB/SIMULINK http://www.mathworks.com
• 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)
                           4/17/2011



                       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
                                 4/17/2011



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




                                            USB cable
                                        4/17/2011


                                    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
  file)
  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.
                          4/17/2011



                             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
4/17/2011




   Other Stuff
            4/17/2011




Other Stuff (Simulink screen shot)
                         4/17/2011



                       Other Stuff (Links)
• Cowtown BEST http://www.cowtownbest.org
   – Today’s training files will be posted here later
• Old BEST site (files are here) http://www.bestinc.org/MVC/
   – 2010 BEST training
     http://www.bestinc.org/MVC/FileManagement/list?dir=77
• New BEST site http://best.eng.auburn.edu

• easyC software http://www.intelitekdownloads.com/easyCV4
• easyC web training
  https://bestrobotics.webex.com/bestrobotics/ldr.php?AT=pb&SP=M
  C&rID=12055317&rKey=16b4ce6fad4d31a9

• RobotC software http://www.robotc.net/download/cortex
• RobotC web training http://www.robotc.net/education/webinars

• Mathworks MATLAB/SIMULINK http://www.mathworks.com
• Simulink web training ftp://ftp.mathworks.com/pub/tech-
  support/student_download/tatkins/VEX-BEST-overview_full.wmv

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:51
posted:4/18/2011
language:English
pages:17