EasyManuals Logo

Parallax Boe-Bot User Manual

Parallax Boe-Bot
360 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #232 background imageLoading...
Page #232 background image
Page 218 · Robotics with the Boe-Bot
This is the subroutine that performs the RCTIME measurements on both photoresistor RC
circuits. The measurement for the left circuit is stored in the
timeLeft variable, and the
measurement for the right circuit is stored in the
timeRight variable.
Test_Photoresistors:
HIGH 6
PAUSE 3
RCTIME 6,1,timeLeft
HIGH 3
PAUSE 3
RCTIME 3,1,timeRight
RETURN
The Navigate subroutine uses an IF…THEN statement to compare the timeLeft variable
against the
LeftThreshold constant and the timeRight variable against the
RightThreshold constant. Remember, when the RCTIME measurement is small, it
means bright light is detected, and when it’s large, it means the light is not as bright. So,
when one of the variables that stores an
RCTIME measurement is smaller than the
threshold constant, it means the flashlight beam has been detected; otherwise, the
flashlight beam has not been detected. Depending on which condition this subroutine
detects (both, left, right or neither), the correct navigation pulses is applied, followed by a
PAUSE before the RETURN command exits the subroutine.
Navigate:
IF(timeLeft<LeftThreshold)AND(timeRight<RightThreshold) THEN
PULSOUT 13, 850
PULSOUT 12, 650
ELSEIF (timeLeft < LeftThreshold) THEN
PULSOUT 13, 700
PULSOUT 12, 700
ELSEIF (timeRight < RightThreshold) THEN
PULSOUT 13, 800
PULSOUT 12, 800
ELSE
PULSOUT 13, 750
PULSOUT 12, 750
ENDIF

Table of Contents

Other manuals for Parallax Boe-Bot

Questions and Answers:

Question and Answer IconNeed help?

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

Parallax Boe-Bot Specifications

General IconGeneral
BrandParallax
ModelBoe-Bot
CategoryRobotics
LanguageEnglish