EasyManua.ls Logo

Parallax Boe-Bot - Page 149

Parallax Boe-Bot
360 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4: Boe-Bot Navigation · Page 135
NEXT
END
You can also think about the distance you just recorded as your Boe-Bot’s speed, in units
per second. Let’s say that your Boe-Bot traveled 9 in (23 cm). Since it took one second
for your Boe-Bot to travel that far, it means your Boe-Bot travels at around 9 in/s (23
cm/s). Now, you can figure out how many seconds your Boe-Bot has to travel to go a
particular distance.
Inches and centimeters per second – The abbreviation for inches is in, and the
abbreviation for centimeters is cm. Likewise, inches per second is abbreviated in/s, and
centimeters per second is abbreviated cm/s. Both are convenient speed measurements for
the Boe-Bot. There are 2.54 cm in 1 in. You can convert inches to centimeters by
multiplying the number of inches by 2.54. You can convert centimeters to inches by dividing
the number of centimeters by 2.54.
Example – Time for 20 in
At 9 in/s, your Boe-Bot has to travel for
2.22 s to travel 20 in.
s22.2
in 9
s1
in 20
in/s 9
in 20
time
=
×=
=
Example – Time for 51 cm
At 23 cm/s, your Boe-Bot has to travel for
2.22 s to travel 51 cm.
s22.2
cm 23
s1
cm 15
cm/s 23
cm 51
time
=
×=
=
In Chapter 2, Activity #6, we learned that it takes 24.6 ms (0.024 s) each time the two
servo
PULSOUT and one PAUSE commands are executed in a FOR…NEXT loop. The
reciprocal of this value is the number of pulses per second that the loop transmits to each
servo. A reciprocal is when you swap a fraction's numerator and denominator. Another
way to take a reciprocal is to divide a number or fraction into the number one. In other
words, 1 ÷ 0.024 s/pulse = 40.65 pulses/s.
Since you know the amount of time you want your Boe-Bot to move forward (2.22 s) and
the number of pulses the BASIC Stamp sends to the servos each second (40.65 pulses/s),

Table of Contents

Other manuals for Parallax Boe-Bot