1 / 34

V E X Robotics Design System

V E X Robotics Design System. EasyC Drive Code. Outline. The Programming Kit Understanding the Controller Your 1 st EasyC Program Common Problems. The Programming Kit. EasyC v2 for V E X robots only EasyC Pro is for V E X & 2004-2009 FRC USB to serial port adapter really SLOW!

Download Presentation

V E X Robotics Design System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VEX Robotics Design System EasyC Drive Code

  2. Outline • The Programming Kit • Understanding the Controller • Your 1st EasyC Program • Common Problems

  3. The Programming Kit • EasyC v2 • for VEX robots only • EasyC Pro is for VEX & 2004-2009 FRC • USB to serial port adapter • really SLOW! • use a serial cable if your computer has a serial port • dongle & telephone cables • for connecting the robot to a computer EasyC CD USB to serial adapter dongle telephone cable

  4. VEX Controller(Transmitter) • 6 channels • x-axis of right joystick (0-255) • y-axis of right joystick (0-255) • y-axis of left joystick (0-255) • x-axis of left joystick (0-255) • right back button (0, 127, 255) • left back button (0, 127, 255) • multiple frequencies (replaceable crystals)

  5. Sample Program in EasyC Pro

  6. Select the VEX Controller

  7. Select the VEX Controller

  8. Select the VEX Controller

  9. Start a New Project

  10. Select the Controller Configuration

  11. Type in descriptions of what you’re going to plug into each port.

  12. Type in descriptions of what you’re going to plug into each port.

  13. Expand Program Flow

  14. Drag a WHILE loop onto the flow chart.

  15. Drag a WHILE loop onto the flow chart.

  16. Enter 1 (for true) to make an endless loop.

  17. Select an RC Control block. Note: Arcade = 1 joystick drive Tank = 2 joystick drive The number of motors should match your robot.

  18. Drag your RC Control block into the while (1) loop.

  19. Select the numbered slot you plugged your left motor into.The labels from the Controller Configuration automatically appear.

  20. Select the numbered slot you plugged your right motor into.The labels from the Controller Configuration automatically appear.

  21. For Arcade change the Forward/Reverse Channel to 2(the y-axis of the right joystick)

  22. For Arcade change the Rotate Channel to 1(the x-axis of the right joystick)

  23. You are done writing your program. Congratulations!

  24. Build & Download your program.

  25. Build & Download your program.

  26. Your program is finished downloading whenthe bar goes down (erases old code)and goes back again (loads new code).

  27. Save your program even if it didn’t work.

  28. “My code won’t download!”(Is your robot on?) The BATT POWER light should be green. The POWER switch should be ON. Make sure to turn your transmitter on too.

  29. “My code won’t download!”(Did you use a fresh battery?) What color is the BATT POWER light on the controller? charging station controller battery robot battery mounting straps • green: okay battery • red: dead battery

  30. “My code won’t download!”(Is the programming cord hooked up?) • The telephone cord should be plugged into the port labeled SERIAL on the robot controller. • The other end of the telephone plug should be plugged into the dongle. • The other end of the dongle should be attached to the computer (either by the USB to serial adapter or a serial cable). USB to serial adapter telephone cable computer dongle

  31. “My code won’t download!”(Is the correct port selected?) • Step 2: • Pick a COM Port • Try to download your code again • Step 1: • Go to the Build & Download menu • Select Loader Setup • Step 3: • Keep trying all the available ports until you find one that allows you to download

  32. “My robot doesn’t drive right!”(How did you plug the motors up?) Everything should be plugged in according to the Controller Configuration

  33. “My robot doesn’t drive right!”(Did you use servos instead of motors?) • check the label • motors spin continuously (360° of rotation) • servos spin back and forth (120° of rotation)

  34. “My robot doesn’t drive right!”(Do you need to invert any of your motors?) • Test drive your robot with all it’s wheels off the ground • Look to see if any motors need to spin in the other direction • Check Invert Direction to make a wheel spin in the other direction. • Build & Download your modified code

More Related