Parallax Boe-Bot Student Manual page 127

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

When the servo is done turning, you will be prompted to enter another value.
Type 850 and then press the Enter key.
Verify that the servo turns full speed counterclockwise.
Try measuring the wheel's rotational speed in RPM (revolutions per minute) for a range
of pulse widths between 650 and 850. Here's how:
Place a mark on the wheel so that you can see how far it turns in 6 seconds.
Use the Debug Terminal to test how far the wheel turns for each of these pulse
widths: 650, 660, 670, 680, 690, 700, 700, 710, 720, 730, 740, 750, 760, 770,
780, 790, 800, 810, 820, 830, 840, 850
For each pulse width, multiply the number of turns by 10 to get the RPM. For
example, if the wheel makes 3.65 full turns, it was rotating at 36.5 RPM.
Explain in your own words how you can use pulse width to control Continuous
Rotation servo speed.
' Robotics with the Boe-Bot - TestServoSpeed.bs2
' Enter pulse width, then count revolutions of the wheel.
' The wheel will run for 6 seconds
' Multiply by 10 to get revolutions per minute (RPM).
'{$STAMP BS2}
'{$PBASIC 2.5}
counter
VAR
pulseWidth
VAR
pulseWidthComp VAR
FREQOUT 4, 2000, 3000
DO
DEBUG "Enter pulse width: "
DEBUGIN DEC pulseWidth
pulseWidthComp = 1500 - pulseWidth
Chapter 3: Assemble and Test Your Boe-Bot · Page 113
Word
Word
Word
' Signal program start/reset.

Advertisement

Table of Contents
loading

Table of Contents