Parallax Boe-Bot Student Manual page 245

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

Advertisement

E2.
a) Vo = 1.4 V
R = (5 * (2000/Vo)) – 2000
= (5 * (2000/1.4)) – 2000
= (5 * 1428.57) – 2000
= 7142.86 – 2000
= 5142.86
= 5143 Ohm
When Vo = 1.4V, R = 5143 Ω
c) Vo = 3.0 V
R = (5 * (2000/3.0)) – 2000
= (5 * 666.67) – 2000
= 3333.33 – 2000
= 1333.33
= 1333 Ohm
When Vo = 1.4V, R = 1333 Ω
E3. The average of these three values in a variable named
myScaledAvereage
myAverage = firstValue + secondValue + thirdValue / 3
myScaledAverage = myAverage * 7 / 8
Declarations as separate variables:
myAverage
myScaledAverage VAR
Declarations using aliasing:
myAverage
myScaledAverage VAR
P1. The first step is to use "TestBothPhotoresistors.bs2" and determine the values for
the white surface and the black paper. Similar to
"FlashlightControlledBoeBot.bs2", these values can be coded as constants.
Then,
statements can be used to determine whether the values are
IF...THEN
above or below the average readings. (For the author's Boe-Bot, scaling was not
necessary). Here's a program solution that makes the Boe-Bot recognize the
difference between black and white surfaces.
Chapter 6: Light Sensitive Navigation with Photoresistors · Page 231
b) Vo = 1.0 V
:
VAR
Word
Word
VAR
Word
myAverage
R = (5 * (2000/1)) – 2000
= (5 * 2000) – 2000
= (10000) – 2000
= 8000
= 8 kOhm
When Vo = 1.4V, R = 8 kΩ
, storing 7/8 in
myAverage

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Boe-Bot and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF