We want to make the robot chassis move forward, backward, and turn left and right.
The first thing we need to do is tell VEXcode V5 that we have motors we need to control. Click on the CONFIGURE DEVICES button.
Then choose “ADD A DEVICE“. We could set up each motor separately and tell them when to turn on and turn off, but VEX code has a more powerful feature called a drivetrain. Let’s choose a DRIVETRAIN 2-MOTOR device.
Tell it which ports your LEFT and RIGHT motors are connected to. We currently have no sensors attached, so say “NO GYRO“
Without a gyro sensor, you have to describe you robot design to VEXcode in order for it to know how to make accurate turns.
WHEELS:
The standard V5 builds use 4 inch diameter wheels.
TRACK WIDTH:
Track width is the distance between the robot’s right wheel’s center point and the robot’s left wheel’s center point.
The wider the track width, the more revolutions the wheels on each side need to make in opposite directions per degree of turn.
You will need to measure your robot’s track width (center of left wheel to center of right wheel).
WHEEL BASE:
Wheelbase is the distance between the drive shafts of the two drive wheels on the robot’s side.
You will need to measure your wheelbase (axle of front wheel to axle of back wheel).
The standard V5 Clawbot uses 4 inch diameter wheels. It has a track width of about 11.5 inches (center of left wheel to center of right wheel). It has a wheelbase of 6.5 inches (axle of front wheel to axle of back wheel). However, you should measure these for your robot to make sure the numbers match the way it was built.
We have no gears on our Clawbot, so leave the gear ratio at 1:1. You are probably using motors with the green insert, so do not change the GEAR CARTRIDGE.
If you find that the robot drives “backward” when you tell it to go “forward”, then change the blue arrow from pointing up to pointing down.
Be sure to click DONE when you are finished.
Challenge:
Task 1:
Program your robot to drive forward 4 feet. (Each tile in the game field is 2 feet across.)
Task 2:
Program your robot to drive backward 2 feet.
Task 3:
Program your robot to spin 360 degrees left (completely turn around once counter-clockwise).