28125 Parallax Inc, 28125 Datasheet - Page 245

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
E2.
E3. The average of these three values in a variable named
P1. The first step is to use "TestBothPhotoresistors.bs2" and determine the values for
a) Vo = 1.4 V
c) Vo = 3.0 V
myScaledAvereage
Declarations as separate variables:
Declarations using aliasing:
the white surface and the black paper. Similar to
"FlashlightControlledBoeBot.bs2", these values can be coded as constants.
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.
IF…THEN
myAverage = firstValue + secondValue + thirdValue / 3
myScaledAverage = myAverage * 7 / 8
myAverage
myScaledAverage VAR
myAverage
myScaledAverage VAR
R = (5 * (2000/Vo)) – 2000
When Vo = 1.4V, R = 5143 Ω
R = (5 * (2000/3.0)) – 2000
When Vo = 1.4V, R = 1333 Ω
= (5 * (2000/1.4)) – 2000
= (5 * 1428.57) – 2000
= 7142.86 – 2000
= 5142.86
= 5143 Ohm
= (5 * 666.67) – 2000
= 3333.33 – 2000
= 1333.33
= 1333 Ohm
statements can be used to determine whether the values are
:
VAR
VAR
Word
Word
Word
myAverage
b) Vo = 1.0 V
R = (5 * (2000/1)) – 2000
When Vo = 1.4V, R = 8 kΩ
= (5 * 2000) – 2000
= (10000) – 2000
= 8000
= 8 kOhm
myAverage
, storing 7/8 in

Related parts for 28125