Ch4_Solutions_WAM2.2

Ch4_Solutions_WAM2.2 - WAM v. 2.2 Chapter 4 Questions 1....

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

View Full Document Right Arrow Icon
WAM v. 2.2 Chapter 4 Questions 1. What appliances or tools have you relied on in the last week that might contain a microcontroller that controls motion? Inkjet printer, grocery store doors, VCR or DVD player. (p. 101) 2. What command really controls the position of the servo? What is the name of the argument in the command that, if changed, will cause the servo’s position to change? The PULSOUT command really controls the position. Changing the duration argument will change the servo's position, because the duration argument controls the width of the pulse. (p. 116) 3. When a servo is under BASIC Stamp control, what does the LED’s brightness tell you about the signal it is sending to the servo? The LEDs relative brightness gives information about the width of the pulse. When the LED is brighter, the signal width is longer, a 2.0 ms pulse or 10 o'clock signal. When the LED is dim, the signal width is shorter, a 1.0 ms pulse or 2 o'clock signal. (p. 113) 4. If the user is sending messages that tell the servo what position to turn to, what kind of code block is helpful to make sure that he/she does not enter a number that is too large or too small? A code block like that shown on the top of p. 123. It has a DO loop with IF statements nested inside which test the entered values versus the limits. This is sometimes referred to as a "Nested IF" block. 5. What’s the name of the argument used to make a FOR…NEXT loop add or subtract more than one each time through the loop? How do you make a FOR…NEXT loop count backwards? a) The STEP argument. b) To count backwards, make the loop's StartValue greater than its EndValue. (p. 124) 6. What does the servo do if you use the index of a FOR…NEXT loop as the argument for the PULSOUT command’s duration ? The servo horn will sweep through a range of motion. (p. 123)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Exercises 1. The command PULSOUT 14, 750 delivers a 1.5 ms pulse on I/O pin P14. Calculate how long the pulse would last if the duration argument of 750 is changed to 600. Repeat this calculation for these values: (a) 650, (b) 50000, (c) 1, (d) 2, (e) 2000. Using the formula given on p. 116:
Background image of page 2
Image of page 3
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 / 6

Ch4_Solutions_WAM2.2 - WAM v. 2.2 Chapter 4 Questions 1....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online