Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

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?

Left wheel counterclockwise, right wheel 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 turning clockwise (forward), and the left wheel is not moving.

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?

Slow down the right wheel to correct a veer to the left, and slow down the left wheel to
correct a veer to the right. Slow down a wheel by changing its servos
writeMicroseconds us parameter, using values closer to 1500. Start at the
appropriate end of the linear speed control range (14001600), gradually move towards
1500 in increments of 10, and go back in smaller increments if you overshoot.

4. If your BOE Shield-Bot travels 11 in/s, how many milliseconds will it take to
make it travel 36 inches?

Given the data below, it should take about 3727 milliseconds to travel 36 inches:

5. Why does a for loop that ramps servo speed need delay(20) in it?

Without that 20 ms (1/50th of a second) delay between each repetition of the loop, it
would ramp from 0 to 100 so quickly that it would seem like the BOE Shield-Bot just
stepped instantly into full speed. The ramping would not be apparent.

6. What kind of variable is great for storing multiple values in lists?

An Array
7. What kind of loops can you use for retrieving values from lists?

for loops and do-while loops were examples from this chapter

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

9. What condition can you append to a do-loop?

do{...}loop while(condition)

You might also like