28125 Parallax Inc, 28125 Datasheet - Page 226

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
Testing Sensor Response to Flashlight Beam
Before you can program the Boe-Bot to turn towards a flashlight beam, you have to know
the difference between light readings with and without the flashlight beam shining in the
Boe-Bot’s path.
Example Program: TestBothPhotoresistors.bs2
' Robotics with the Boe-Bot - TestBothPhotoresistors.bs2
' Test Boe-Bot RC photoresistor circuits.
' {$STAMP BS2}
' {$PBASIC 2.5}
timeLeft
timeRight
DEBUG "PHOTORESISTOR VALUES", CR,
DO
HIGH 6
"timeLeft
"--------
Enter, save, and run TestBothPhotoresistors.bs2.
Place the Boe-Bot on the surface where it is to follow the flashlight beam. Make
sure it is still connected to the serial cable and that the measurements are
displaying in the Debug Terminal.
Record the values of both time measurements in the first row of Table 6-1.
Turn on your flashlight, and focus your beam in front of the Boe-Bot.
Your time measurements should now be significantly lower than the first set.
Record these new values of both time measurements in the second row of Table
6-1.
Duration Values
timeLeft
VAR
VAR
Table 6-1:
timeRight", CR,
---------"
timeRight
Word
Word
RC-Time Measurements With and Without Flashlight Beam
Description
Time measurements with no flashlight beam (ambient
light).
Time measurements with flashlight beam focused in front
of the Boe-Bot.
' Stamp directive.
' PBASIC directive.
' Variable declarations.
' Initialization.
' Main routine.
' Left RC time measurement.

Related parts for 28125