28125 Parallax Inc, 28125 Datasheet - Page 212
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: 212 of 360
- Download datasheet (5Mb)
Example Program: TestPhotoresistorsDividers.bs2
This example program is TestWhiskers.bs2 adapted to the photoresistor dividers. Instead
of monitoring P5 and P7 as we did with the whiskers, we are now monitoring P3 and P6,
which are connected to the photoresistor divider circuits. This program should display a
value of 1 on both sides in a well-lit room. When you cast a shadow over one or both of
the photoresistors, their corresponding values should change to 0.
' Robotics with the Boe-Bot - TestPhotoresistorDividers.bs2
' Display what the I/O pins connected to the photoresistor
' voltage dividers sense.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "PHOTORESISTOR STATES", CR,
DO
LOOP
DEBUG CRSRXY, 0, 3,
PAUSE 100
√
√
√
√
√
"Left
"-------
Reconnect power to your board.
Enter, save, and run TestPhotoresistorDividers.bs2.
Verify that with no shade, both
Verify that you can use your hand to cast a shadow over each of the
photoresistors and cause its input register to change from 1 to 0.
If you are having difficulty, either with getting a shadow to change the input
register to 0 or if the input registers store 0 regardless of whether or not you cast
a shadow over them, see the Photoresistor Divider Troubleshooting box after the
program listing.
photoresistor reliably changes the state from 1 to 0.
"P6 = ", BIN1 IN6,
"
P3 = ", BIN1 IN3
Right", CR,
--------"
Work on it until your hand casting a shadow over the
IN6
and
IN3
store the value 1.
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: