28125 Parallax Inc, 28125 Datasheet - Page 228
28125
Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet
1.28125.pdf
(360 pages)
Specifications of 28125
Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 228 of 360
- Download datasheet (5Mb)
Constants can even be used to calculate other constants. Here is an example of two
constants, named
four constants just discussed. The
used in the program to figure out whether or not the flashlight beam has been detected.
'
LeftThreshold
RightThreshold CON
The math performed on these constants is an average, and then a scale. The average
calculation for
multiplied by 5 and divided by 8. This means that
value is the
Example Program: FlashlightControlledBoeBot.bs2
√
√
Enter FlashlightControlledBoeBot.bs2 into the BASIC Stamp Editor.
Substitute your
1) in place of the value 108 in the
Math expressions in PBASIC are executed from left to right. First,
added to
divided by 8.
Let’s try this:
You can use parentheses to force a calculation that is further to the right in a line of
PBASIC code to be completed first. For example, you can rewrite this line of PBASIC
code:
In this expression, 35 is multiplied by the result of (
product is added to 750.
like this:
5
/
pulseRight = 35 * (2 – distanceRight) + 750
8
pulseRight = 2 - distanceRight * 35 + 750
of the average of
LeftThreshold
LeftThreshold
LeftAmbient
CON
128 / 2 = 64.
64 * 5 = 320
320 / 8 = 40
LeftBright
timeLeft
LeftBright + LeftAmbient / 2
RightBright + RightAmbient / 2 * 5 / 8
Average
LeftBright
. This value is divided by 2. The result is then multiplied by 5 and
is
measurement with no flashlight beam (from Table 6-
+
LeftThreshold
and
LeftBright
LeftAmbient
RightThreshold
LeftAmbient CON
and
LeftAmbient
+
= 20 + 108 = 128.
LeftThreshold
and
LeftAmbient
2 – distanceRigh
RightThreshold
that are calculated using the
directive.
.
Scale factor
* 5 / 8
/ 2. That result is
is a constant whose
LeftBright
constants are
t), then the
is
Related parts for 28125
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: