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 #281 background imageLoading...
Page #281 background image
Chapter 7: Navigating with Infrared Headlights · Page 267
ENDIF ' its position.
PULSOUT 13,pulseLeft ' Apply the pulse.
PULSOUT 12,pulseRight
PAUSE 15 ' 5 ms for detectors
' Check IRs again in case object is moving
GOSUB Check_IRs
LOOP
' -----[ Subroutines ] ------------------------------------------------
Check_IRs:
FREQOUT 8, 1, 38500 ' Check IR Detectors
irDetectLeft = IN9
FREQOUT 2, 1, 38500
IrDetectRight = IN0
RETURN
P3. The key to solving this problem is to combine "FastIrRoaming.bs2" and
"IrInterferenceSniffer.bs2" in a single program.
' -----[ Title ]-------------------------------------------------------
' Robotics with the Boe-Bot - RoamAndSniffBoeBot.bs2
' Boe-Bot roams around and sounds alarm when IR detected.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Variables ]---------------------------------------------------
irDetectLeft VAR Bit ' Left IR sensor reading
irDetectRight VAR Bit ' Right IR sensor reading
pulseLeft VAR Word ' Pulses sent to servos
pulseRight VAR Word
counter VAR Nib ' Loop counter
' -----[ Initialization ]----------------------------------------------
DEBUG "Program Running!"
FREQOUT 4, 2000, 3000 ' Signal program
start/reset.
' -----[ Main Routine ]------------------------------------------------
Main:
DO
GOSUB Roam
GOSUB Sniff
LOOP

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