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 #290 background imageLoading...
Page #290 background image
Page 276 · Robotics with the Boe-Bot
DO
GOSUB Get_Distances
GOSUB Display_Distances
LOOP
' -----[ Subroutine – Get_Distances ]-----------------------------------------
Get_Distances:
distanceLeft = 0
distanceRight = 0
FOR freqSelect = 0 TO 4
LOOKUP freqSelect,[37500,38250,39500,40500,41500], irFrequency
FREQOUT 8,1,irFrequency
irDetectLeft = IN9
distanceLeft = distanceLeft + irDetectLeft
FREQOUT 2,1,irFrequency
irDetectRight = IN0
distanceRight = distanceRight + irDetectRight
PAUSE 100
NEXT
RETURN
' -----[ Subroutine – Display_Distances ]-------------------------------------
Display_Distances:
DEBUG CRSRXY,2,3, DEC1 distanceLeft,
CRSRXY,9,3, DEC1 distanceRight
RETURN
Your Turn – More Distance Tests
Try measuring the distance of different objects and find out if the color and/or
texture make any difference to the distance measurement.

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