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 #238 background imageLoading...
Page #238 background image
Page 224 · Robotics with the Boe-Bot
' -----[ Subroutine - Average_And_Difference ]--------------------------------
Average_And_Difference:
average = timeRight + timeLeft / 2
difference = average / 6
RETURN
' -----[ Subroutine - Navigate ]----------------------------------------------
Navigate:
' Shadow significantly stronger on left detector, turn right.
IF (timeLeft > timeRight + difference) THEN
PULSOUT 13, 850
PULSOUT 12, 850
' Shadow significantly stronger on right detector, turn left.
ELSEIF (timeRight > timeLeft + difference) THEN
PULSOUT 13, 650
PULSOUT 12, 650
' Shadows in same neighborhood of intensity on both detectors.
ELSE
PULSOUT 13, 850
PULSOUT 12, 650
ENDIF
PAUSE 10
RETURN
Why PAUSE 10 instead of PAUSE 20? Because the Test_Photoresistors
subroutine has two PAUSE commands adding up to 6 ms plus some extra time to execute
the RCTIME commands. Both these factors add to the amount of time between servo
pulses, so the PAUSE in the Navigate subroutine has to be reduced. After some trial
and error experiments, PAUSE 10 appeared to give the servos the most reliable
performance over the widest range of light levels.
Your Turn – Adjusting the Sensitivity to Differences in Light
Right now, the difference variable is the average divided by 6. You can divide
average by a smaller value if you want to make the Boe-Bot less sensitive to differences
in light or divide it by a larger value if you want to make the Boe-Bot more sensitive to
differences in light level.

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