Loop There It Is
Loop There It Is
The VEX V5 Clawbot is an extension of the VEX V5 Speedbot that can be programmed to
move around and interact with objects.
Parts Needed: Part 1
Can be built with:
VEX V5 Classroom Starter Kit
Parts Needed: Part 2
Build Instructions
The green icon indicates that the build needs to be flipped over (upside down).
Only one of the two sub-assemblies made in this step is used right now. The other will be used later in step 9.
Make sure your Smart Motors are oriented in the correct direction (screw holes facing the outside of the build and
the shaft hole towards the inside).
Make sure your Smart Motors are oriented in the correct direction (screw holes facing the outside of the build and
the shaft hole towards the inside).
The green icon indicates that the build needs to be rotated (180 degrees).
The blue call out shows what the orientation of the Robot Brain should be if the build were flipped right side up.
Make sure the 3 wire ports on the Robot Brain are facing the V5 Radio!
The green call outs indicate which port on the Robot Brain to plug each device into using their respective cable.
Be sure to make two assemblies in this step!
This step adds onto the two assemblies started in Step 29.
Make sure to add this to only one of the two sub-assemblies you just made.
Make sure the 12- tooth gear is installed on the right side of the claw.
Make sure that the port on the Smart Motor is facing the right side of the robot when the claw is installed (the
same side as the V5 Radio).
Build Instruction Tips
Check the Appendix for information on how to use the new Hex Nut Retainers.
Exploration
Now that you've finished the build, test what it does. Explore your build and then answer
these questions in your engineering notebook.
Where is the pivot point (the point the robot rotates about) for this robot build?
Make a prediction and then manually move the 4” wheel on one side forward while at the
same time moving the 4” wheel on the opposite side backwards at the same rate.
After manually moving both wheels, now describe where the pivot point is. How would the
pivot point of the robot change if the Build design was changed so both of the 4” Omni
Wheels (steps 14-17) were also powered by motors, making all 4 wheels powered?
Make a prediction and then manually move both wheels on one side forward while at the
same time moving both wheels on the opposite side backwards at the same rate.
After manually moving the wheels again, now describe where the pivot point is. Explain how
a robot’s pivot point could change its behavior.
Test your build, observe how it functions,
and fuel your logic and reasoning skills
through imaginative, creative play.
Robot Repetition
Behaviors to be repeated are grouped in programming structures called loops. The number
of times and how fast they repeat depend on many factors that the programmer can specify.
You can use the Help information inside of VEXcode V5 Blocks to learn about the blocks. For
guidance in using the Help feature, see the Using Help tutorial.
Hardware/Software Required:
1 Engineering Notebook
Save, download, and run the Repeating Actions (No Gyro) example project.
For help, see the tutorial in VEXcode V5 Blocks that explains how to Download and Run a
Project.
Check your explanations of the project in your engineering notebook and add notes to
correct them as needed.
2. Run the project and observe the robot.
Look at the Repeating Actions (No Gyro) project (on the right) again. This project will repeat
the forward and then turn behavior four times. A repeat block is used when you want to
use a set of behaviors for a certain number of times. If the repeat block is replaced with a
forever block, the robot would repeat the forward and then turn behaviors forever.
In the project on the left, a sensor's input is used to determine when to begin turning. The
project on the right uses a fixed Drivetrain distance to determine when to begin turning.
In order to continually check a sensor's input, an if/else block is used together with a forever
block. In the project on left, the robot will turn right when the BumperH sensor is pressed,
otherwise the robot will drive forward forever if the BumperH sensor is not pressed. To
continually check the BumperH sensor's value, the if/then block is within a forever block.
The above project on the left is a practical use-case of a structure that repeats forever - using
forever blocks and if/then blocks together. Imagine a self-driving sweeper that continues to
drive forward until it runs into a wall or object, then turns before continuing to drive.
3. The Squared Loops Challenge!
This exploration will give you the tools to be able to start creating some cool projects that use
loops.
To access additional information, right click on a command name in your workspace to see
help for that command.
Make sure you have the hardware required, your engineering notebook, and VEXcode V5
Text downloaded and ready.
Hardware/Software Required:
1 Engineering Notebook
Look over the project and then do the following in your engineering notebook.
Predict what the project will have the Clawbot do. Explain more than the fact that the
project repeats.
What is it repeating? What is the Clawbot doing?
Write your prediction, but do not break the short project into more than two parts.
Check your explanations of the project in your engineering notebook and add notes to
correct them as needed.
2. Run the project and observe the robot.
Look at the Repeating Actions project (on the right) again. This project will repeat the forward
and then turn behavior four times. A "repeat" loop structure is used when you want to use
a set of behaviors a certain number of times.
If the repeat structure is replaced with a "while" loop structure, the robot will repeat the
forward and then turn behaviors "while" the condition is true. You can also set the condition
to "true" to have the "while" loop continue forever.
In the project on the left, a sensor's input is used to determine when to begin turning. The
project on the right uses a fixed Drivetrain distance to determine when to begin turning.
The above project on the left is a practical use-case of a structure that repeats forever - using
while loops and if statements together. Imagine a self-driving sweeper that continues to
drive forward until it runs into a wall or object, then turns before continuing to drive.
3. The Squared Loops Challenge!
Factory Robots
Factories first began using modern industrial robots in the early 1960’s. These robots could
do the dirty, dull, and dangerous jobs that were previously completed by humans. Since then,
factories all over the world have invested millions of dollars to develop and build robots that
can manufacture their products quickly and efficiently.
Factory robots are always being improved upon as new technology is expanded. New metals
and materials allow robots to be used in high pressure or high temperature environments.
Usually separated to keep human workers safe in case of an accident, factory robots are
being made from new “softer” materials. These materials, such as rubber and plastic, can
help reduce injuries in a robot/human collision. With the introduction of artificial intelligence
and sensors, factory robots can be “taught” new ways of delivering these products overnight
and adapt their movements in real time. This allows more productivity and precision.
Factory robots are used in the production of many products, but the top three robotic jobs in
manufacturing are:
Drilling
Welding
Painting and Sealing
Controllers and Loops - VEXcode
V5 Blocks
The following image shows the Tank Drive example project from VEXcode V5 Blocks. The
forever loop in this project checks the positions of Axes 2 and 3 forever in order to set the
velocity of the motors.
Loops are important even for autonomous programming without a controller. A loop helps to
simplify and organize repeated commands within a project.
Controllers and Loops - VEXcode
V5 Text
The following image shows the Tank Drive example project from VEXcode V5 Text. The
forever loop in this project checks the positions of Axes 2 and 3 forever in order to set the
velocity of the motors.
For the challenge, you will need to clear a space on the floor large enough for a V5 Clawbot
to move around for a dance routine without bumping into anything. A 1x1 meter area is
recommended to give each Clawbot adequate space for moving.
Design, Develop, and Iterate on
your Project - VEXcode V5 Blocks
Answer the following questions in your engineering notebook as you design your project.
What type of robot dance will you create? Explain with details.
What types of loops will you use and why?
What steps will you follow to test the dance? Explain with details.
In order to help you plan, click here for a few example dance moves that you might include in
the Clawbot's dance.
Run your project to test it often and iterate on it using what you learned from your testing.
Share your final project with your teacher.
If you're having trouble getting started, review the following in VEXcode V5 Blocks:
Example projects
Using Loops tutorial
Rules:
Each Clawbot will dance one-at-a-time within the 1x1 meter area.
The dancing continues until the Stop button on the Brain's screen is pressed to stop the
project from running.
The arm must be raised and lowered.
The claw must open and close.
The Clawbot must turn left and right.
The Clawbot must drive forward and in reverse.
The project needs to be stopped immediately if the Clawbot collides with anything or falls
over. That is a losing dance.
Design, Develop, and Iterate on
your Project - VEXcode V5
Text
Answer the following questions in your engineering notebook as you design your project.
What type of robot dance will you create? Explain with details.
What types of loops will you use and why?
What steps will you follow to test the dance? Explain with details.
In order to help you plan, click here for a few example dance moves that you might include in
the Clawbot's dance.
Run your project to test it often and iterate on it using what you learned from your testing.
Share your final project with your teacher.
If you're having trouble getting started, review the following in VEXcode V5 Text:
Example projects:
Review previous versions of your RepeatingActions project to assist with creating your
new one.
The Groove Machine Challenge -
VEXcode V5 Text
Rules:
Each Clawbot will dance one-at-a-time within the 1x1 meter area.
The dancing continues until the Stop button on the Brain's screen is pressed to stop the
project from running.
The arm must be raised and lowered.
The claw must open and close.
The Clawbot must turn left and right.
The Clawbot must drive forward and in reverse.
The project needs to be stopped immediately if the Clawbot collides with anything or falls
over. That is a losing dance.
Understand the core concepts and how
to apply them to different situations.
This review process will fuel motivation
to learn.
Review - VEXcode V5 Blocks
1. True or False: Controllers use loops in order to check for input responses from the
buttons and joysticks.
o True
o False
2. Loops are .
o documents the data types available
o conditionally executes a group of statements
o statement(s) to handle errors that occur
o programming structures that repeat behaviors
3. True or False: In VEXcode V5 Blocks, the repeat and forever loop blocks repeat any
blocks inside of it, and for the number of times specified. Blocks inside of the repeat and
forever loop blocks are run in order from top to bottom.
o True
o False
4. In the following project, how many times does the robot turn right?
o The robot will turn right 9 times because it is set to turn 90 degrees.
o The robot will turn right one time because there is only one turn for block in
the project.
o The robot will turn right 4 times because the repeat block is set to repeat 4
times.
o The robot will turn right 5 times because the drive for block moves 5mm.
5. True or False: Robots are not good at repetitive tasks like humans are because any
slight error in their programming increases with each repetition.
o True
o False
Review - VEXcode V5 Text
6. True or False: Controllers use loops in order to check for input responses from the
buttons and joysticks.
o True
o False
7. Loops are .
o documents the data types available
o conditionally executes a group of statements
o statement(s) to handle errors that occur
o programming structures that repeat behaviors
8. True or False: In VEXcode V5 Text, the repeat and forever loop structures repeat
any instruction inside of it, and for the number of times specified. Instructions inside of
the repeat and forever loop structures are run in order from top to bottom.
o True
o False
9. In the following project, how many times does the robot turn right?
o The robot will turn right 9 times because it is set to turn 90 degrees.
o The robot will turn right one time because there is only one turn for instruction
in the project.
o The robot will turn right 4 times because the repeat structure is set to repeat
4 times.
o The robot will turn right 5 times because the drive for instruction moves
5mm.
10. True or False: Robots are not good at repetitive tasks like humans are because any
slight error in their programming increases with each repetition.
o True
o False
Additional information, resources, and materials.
Using the 1 Post Hex Nut Retainer
w/ Bearing Flat
Alexander Graham Bell's notebook entry from a successful experiment with his first telephone
The Sprinkler
The Sprinkler
Hands in the air!