Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 41

VEXcode V5 Assignment 1 -

Programming the V5 Clawbot


Programming the Motors &
Sensors Setup & the Remote
Control program
By: Mr. Gravitt
The VEXcode V5 Software
• Click on the VEXcode
V5 Software Icon
• This version of the
software is the same
on both MAC & PC.
• This version allows you to program using
Blocks &/or a Blocks/Text Hybrid.
Step 1 - Open VEXcode V5 Software
• This is what the software looks like when
opened.
Step 2 Open Devices
• Click on the Devices Icon located here.
Step 3 - Opened Devices
• This blue box opens, this is the devices
section..
Step 5 - Add a Device
• We need to tell
the software what
devices (motors,
sensors, &/or
controllers) that
we are plugging
into our robot,
what ports we are
plugging them
into, & name • Click Add a Device.
them.
Step 6 - Select a Device
• We can load our
drivetrain manually, or
in this case we are using
a 2-Motor Tank Drive
setup. Therefore, we
can use this shortcut.
• It has a 2-Motor & a 4-
Motor Tank drive
shortcut options.
• Click Drivetrain 2-Motor.
Step 7 - Select
• Software asks us
LEFT Motor
which PORT we
have the LEFT
Motor plugged
into?
• If you followed
directions booklet
then you should
have the left motor
plugged into PORT1
• Click On PORT1.
• & Then Click Done.
Step 8 - Select • Port1 should be
Right Motor greyed out.
• Software asks us
which PORT we have
the RIGHT Motor
plugged into?
• If you followed
directions booklet
then you should have
the RIGHT motor
plugged into PORT10.
• Click On PORT10.
• & Then Click Done.
• Software asks
Step 9 - Select Gyro
us if we are
using a Gyro
&/or an Inertial
Sensor.
• We are not
using either
right now.
• Click On NO
GYRO.
• & Then Click
Done.
NOTES:
Software asks us
what sizes parts we
are using & we need
to measure:
• What Size Wheels
= 4 inches
• Length of Wheel
Base = 295MM
• Width of the
Wheel Base =
165MM
NOTES:
• The software asks
us what color
Gear Cartridge we
have in the
motor?
• You can see the color of cartridge the motor
has in it through this window.
• Red = 36:1 @ 100RPM (High Speed Low Torque)
• Green = 18:1 @ 200RPM (Middle Speed & Torque)
• Blue = 6:1 @ 600RPM (Low Speed High Torque)
Step 10.1 - Drivetrain Settings
Software asks us:
• What Size Wheels
• Length of Wheel
Base
• Width of the Wheel
Base
• Gear Ratio
• & What Gear
Cartridge we have in
our motors.
Step 10.2
Drivetrain Settings
If you followed the book:
• Wheels 4 inch
• Wheel Base 295mm
• Wheel Base is 165mm
• Gear Ratio is
1:1 (NO GEARS)
• & Gear Cartridge have
the Green 18:1
200RPM
• Click Done.
Step 11 Add Next Device
• You should now
see the Drivetrain
device listed with
Left Motor 1, Right
Motor 10, & NO
Gyro selected. (NO Gyro should be greyed

out & not selected)


• Next, Click Add a Device
• We are going to add our next motor, your
Robot’s Arm Motor.
Step 12.1 Add
Motor
• Click on Motor
• We are going to
add the Arm
Motor to our
Robot.
• If you followed the
instruction booklet
then you should
have placed it into
PORT 8.
Step 12.2 Add Motor
• You should see
PORTS 1 & 10 greyed
out. Those two are
the drive motors that
we have already
entered.
• If you followed the
instruction booklet
then you should
have placed it into
PORT 8.
Step 12.3 Add Motor
• You Can Name
the Motor
• Select Forward
& Reverse
Directions
• Select the Gear
Cartridge
• Flip Motor
Forward or
Reverse
Step 12.4 Add Motor
• Name Motor –
ArmMotorPort8
• Select Forward &
Reverse Directions
• Select the Green
18:1 200 RPM Gear
Cartridge
• Flip Motor Forward
or Reverse
• Click Done.
Step 13.1
Add the Claw
Motor
• You should see
the Motor
Device
ArmMotorPort
8 listed in the
list & it should • Click on Add a Device
have an #8 in
the port.
Step 13.2
Add the Claw Motor
• We are going to add
the claw motor now.
• Click on Add Motor.
Step 13.3 Add
the Claw Motor
• If you followed
the instruction
booklet, then
you should
have the Claw
Motor plugged
into PORT 3.
• If this is the
case then Click
on PORT 3.
Step 13.4 Add
the Claw
Motor
• This should
pop up
again.
Step 13.5 Add
the Claw Motor
• Name it
ClawMotorPort3.
• Choose Green
Gear Cartridge.
• Click Done
Step 14.1 Add Controller
• You should see
the Drivetrain,
Arm Motor, & the
Claw Motor now.
• Next we are going
to add another
device, the
Remote
Controller.
• Click Add a
Device.
Step 14.2 Add
Controller
• Click on Add a
Controller.
Step 14.3 Select the Joysticks
• NOTE: It is possible to
have multiple
controllers. This can be
useful at competitions!
• NOTE2: It is possible to
program any buttons to
do anything.
• We have used 2-motor
drive, so we have to pick
joysticks.
• Click on a Joystick.
Step 14.4 Choose Joystick Type
• Click on a Joystick.
• It will show you one
option for drive.
• Showing single joystick
drive on the Left
Joystick. With forward
being forward, back
being back, Right
rotating/spinning right,
& Left rotating/spinning
left.
Step 14.5 Choose Joystick
• Click on a Joystick AGAIN.
• It will show you another
option for drive.
• Showing single joystick
drive on the Right
Joystick. With forward
being forward, back being
back, Right
rotating/spinning right, &
Left rotating/spinning left.
Step 14.6 Choose Joystick Type
• Click on a Joystick AGAIN.
• It will show you another
option for drive.
• Showing dual joystick
drive. With forward &
back being on the Left &
Right Joystick in
combination &
rotating/spinning by using
both joysticks in
opposition.
Step 14.7 Choose Joystick Type
• Once you have
selected the
drive option you
want to use, then
Click DONE.
Step 14.8 Add Arm Buttons
• You should see the
option you’ve selected
for the drive done.
• Next we are going to
program the Arm
Motor.
• You can use whatever
buttons you like.
• I’m selecting the Left L1
& L2 buttons to raise &
lower the Arm.
Step 14.9 Add the Claw Buttons
• You should see the
option you’ve selected
for the drive done.
• Next we are going to
program the Arm
Motor.
• You can use whatever
buttons you like.
• I’m selecting the Left L1
& L2 buttons to raise &
lower the Arm.
Step 15.1 DONE! You should see the
following:
1. Drivetrain device
listed with Left
Motor 1, Right
Motor 10, & NO
Gyro selected. (NO
Gyro should be
greyed out)
This will program the 2. ArmMotorPort8
robot to operate via 3. ClawMotorPort3
Remote Control.
4. Controller1
Step 15.2 Code in Python
• You click here & here & you can see the
code in Python.
Step 15.3 Code in C++
• You click here & here & you can see the
code in C++.
Step 15.3 Code in Populates Blocks
• You click can see that your blocks are now
populated with dropdowns with your motors.
Step 15.4 Code in TEXT
• You click here to transform from BLOCKS coding
to TEXT coding.
Step 15.5 TEXT Project in Python
• You should see the following.
• NOTE: I haven’t found a way to go back to Blocks!
Step 15.6 TEXT Project in C++
• You should see the following.
• NOTE: I haven’t found a way to go back to Blocks!
Step 15.7 - Your Ready to Program
• Remote control should work.
• Also, your ready to start autonomous programs…

You might also like