Robotics_V2.2_Ch4_solution

# Robotics_V2.2_Ch4_solution - Chapter 4 Questions 1. What...

This preview shows pages 1–3. Sign up to view the full content.

Chapter 4 Questions 1. What direction does the left wheel have to turn to make the Boe-Bot go forward? What direction does the right wheel have to turn? Left wheel counterclockwise, right wheel clockwise. 2. What direction does the right wheel have to turn to make the Boe-Bot go backward? What direction does the left wheel have to turn? Right wheel counterclockwise, left wheel clockwise. 3. What controls the speed and direction the servo turns? Which PBASIC command and argument give you programmed control over servo speed and direction? The width of the pulse sent to the servo. The PULSOUT command's Duration argument controls the speed and direction the servo turns. 4. When the Boe-Bot pivots to the left, what are the right and left wheels doing? What PBASIC commands do you need to make the Boe-Bot pivot left? The right wheel is turning clockwise (forward), and the left wheel is not moving. PULSOUT 13, 750 PULSOUT 12, 650 5. If your Boe-Bot veers slightly to the left when you are running a program to make it go straight ahead, how do your correct this? What command needs to be adjusted and what kind of adjustment should you make? You can slow down the right wheel to correct a veer to the left. The PULSOUT command for the right wheel needs to be adjusted. PULSOUT 12, 650 Adjust the 650 to something closer to 750 to slow the wheel down. PULSOUT 12, 663 6. If your Boe-Bot travels 11 in/s, how many pulses will it take to make it travel 36 inches? Given: Boe-Bot speed = 11 in/s Boe-Bot distance = 36 in/s p. 128 pulses = (Boe-Bot distance / Boe-Bot speed) * (40.65 pulses / s) = (36 / 11 ) * (40.65) = 133.04

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
= 133 It should take 133 pulses to travel 36 inches. 7. If your Boe-Bot travels 60 cm/s, how many pulses will it take to make the Boe- Bot travel 1 meter? Given: Boe-Bot speed = 60 cm/s Boe-Bot distance = 1 m = 100 cm p. 128 pulses = (Boe-Bot distance / Boe-Bot speed) * (40.65 pulses / s) = (100 / 60 ) * (40.65) = 67.75 = 68 It should take 68 pulses to travel 1 meter. 8. What’s the relationship between a FOR…NEXT loop’s Counter argument and the PULSOUT command’s Duration argument that makes ramping possible? The key is to use variables along with constants for the PULSOUT command's Duration argument. By varying the Duration argument, the servo speed can be changed incrementally to "ramp up" or "ramp down". The FOR. ..NEXT loop's pulseCount variable can be used as an offset (plus or minus) to 750 (the center position) in the Duration argument. FOR pulseCount = 1 to 100 PULSOUT 13, 750 + pulseCount PULSOUT 12, 750 – pulseCount PAUSE 20 NEXT 9. What’s the difference between a subroutine and a subroutine call? What are the features of each? The subroutine call tells the program to jump to the subroutine. The
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/25/2008 for the course ME 456 taught by Professor Radcliffe during the Fall '07 term at Michigan State University.

### Page1 / 18

Robotics_V2.2_Ch4_solution - Chapter 4 Questions 1. What...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online