Parallax Boe-Bot Student Manual page 231

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

How FlashlightControlledBoeBot.bs2 Works
These are the four constant declarations that you used with your own values from Table
6-1.
LeftAmbient
RightAmbient
LeftBright
RightBright
Now that the four constants have been declared, the next two lines average and scale the
values to come up with threshold values for the program. These threshold values can be
compared with the current
whether the photoresistors are sensing ambient light or a focused beam.
'
LeftThreshold
RightThreshold CON
These variables are used to store the
timeLeft
timeRight
This is the reset indicator that has been used in most of the programs in this text.
FREQOUT 4, 2000, 3000
The Main Routine section contains just two subroutine calls. All the actual work in the
program occurs in the two subroutines.
measurements for both RC photoresistor circuits, and the
decisions and delivers the servo pulses.
DO
GOSUB Test_Photoresistors
GOSUB Navigate
LOOP
Chapter 6: Light Sensitive Navigation with Photoresistors · Page 217
CON
108
CON
114
CON
20
CON
22
and
timeLeft
timeRight
Average
CON
LeftBright + LeftAmbient / 2
RightBright + RightAmbient / 2 * 5 / 8
measurements.
RCTIME
VAR
Word
VAR
Word
Test_Photoresistors
measurements to determine
Scale
* 5 / 8
takes the
subroutine makes the
Navigate
RCTIME

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Boe-Bot and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF