28125 Parallax Inc, 28125 Datasheet - Page 234
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: 234 of 360
- Download datasheet (5Mb)
Figure 6-12: Photoresistor Orientation
Programming the Roaming Toward the Light Behavior
The key to roaming toward brighter light sources is going straight ahead when the
differences between the photoresistor measurements are small, and turning toward the
smaller photoresistor measurement when there is a large difference between the two
measurements. In effect, this means the Boe-Bot will turn toward bright light.
Initially this seems like a simple enough programming task;
example below should work. The problem is, it doesn’t because the Boe-Bot gets stuck
turning left and then right again because the change in
large. Each time the Boe-Bot turns a little, the
change so much that the Boe-Bot tries to correct and turn back. It never manages to get
any forward pulses in.
√
P15
P14
P13
P12
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
X2
Point the light collecting surfaces of your photoresistors upward and outward
shown in Figure 6-12.
IF (timeLeft > timeRight) THEN
ELSEIF (timeRight > timeLeft) THEN
X3
PULSOUT 13, 850
PULSOUT 12, 850
Vdd
+
Vin
Vss
timeRight
timeLeft
IF…THEN
' Turn right.
' Turn left.
and
and
timeLeft
reasoning like this
timeRight
variables
is too
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: