0% found this document useful (0 votes)
85 views2 pages

Chapter 4 Challenges By: Rubi Contreras CET-6: Questions

The document provides questions and answers about controlling a BOE Shield-Bot robot. It discusses how the wheels need to turn for the robot to go forward or pivot left. It also discusses how to correct issues like veering, calculating time for traveling a distance, using for loops and arrays, and switch/case statements. Exercises are provided to write routines to control the robot's movement. Projects involve modifying wheel speeds to change behavior and writing sketches to navigate courses.

Uploaded by

api-358353351
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views2 pages

Chapter 4 Challenges By: Rubi Contreras CET-6: Questions

The document provides questions and answers about controlling a BOE Shield-Bot robot. It discusses how the wheels need to turn for the robot to go forward or pivot left. It also discusses how to correct issues like veering, calculating time for traveling a distance, using for loops and arrays, and switch/case statements. Exercises are provided to write routines to control the robot's movement. Projects involve modifying wheel speeds to change behavior and writing sketches to navigate courses.

Uploaded by

api-358353351
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter 4 Challenges

By: Rubi Contreras CET-6


Questions
1. What direction does the left wheel have to turn to make the BOE Shield-Bot go forward?
What direction does the right wheel have to turn?
The left wheel has to go counterclockwise and the right wheel has to go clockwise.
2. When the BOE Shield-Bot pivots on one wheel to the left, what are the wheels doing?
What code do you need to make the BOE Shield-Bot pivot left?
The right wheel is moving forward or clockwise and the left is not moving at all.
3. If your BOE Shield-Bot veers slightly to one side when you are running a sketch to make
it go straight ahead, how do you correct this? What command needs to be adjusted and what
kind of adjustment should you make?
Make the right wheel slower to correct a veer to the left, or slow down the left wheel to correct a
veer to the right. You should change the writeMicroseconds us parameter closer to 1500.
4. If your BOE Shield-Bot travels 11 in/s, how many milliseconds will it take to make it
travel 36 inches?
Somewhere around 3700 milliseconds.
5. Why does a for loop that ramps servo speed need delay(20) in it?
For the ramp to be noticeable, if not the change would be too quick and makes it seem as if it
just went into full speed.
6. What kind of variable is great for storing multiple values in lists?
Arrays are great for storing multiple values in lists.
7. What kind of loops can you use for retrieving values from lists?
Do-while and and for loops were some examples given.
8. What statement can you use to select a particular variable and evaluate it on a case-by-
case basis and execute a different code block for each case?
Switch/case is the statement you can use.
9. What condition can you append to a do-loop?
Do {...} loop while (condition)

Exercises
1. Write a routine that makes the BOE Shield-Bot backup at full speed for 2.5 seconds.
2. Lets say that you tested your servos and discovered that it takes 1.2 seconds to make a
180 turn with right-rotate. With this information, write routines to make the BOE Shield-Bot
perform 30, 45, and 60 degree turns.
3. Write a routine that makes the BOE Shield-Bot go straight forward, then ramp into and
out of a pivoting turn, and then continue straight forward.
Projects
1. It is time to fill in column 3 of Table 2-2. To do this, modify the us arguments in
the writeMicroseconds calls in the ForwardThreeSeconds sketch using each pair of values
from column 1. Record your BOE Shield-Bots resultant behavior for each pair in column 3.
Once completed, this table will serve as a reference guide when you design your own custom
BOE Shield-Bot maneuvers.
2. The diagram shows two simple courses. Write a sketch that will make your BOE Shield-
Bot navigate along each figure. Assume straight-line distances (the triangles sides and the
diameter of the circle) are either 1 yard or 1 meter.

You might also like