TestIrPairsAndIndicators

TestIrPairsAndIndicators - "IR DETECTORS", CR,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
' Robotics with the Boe-Bot - TestIrPairsAndIndicators.bs2 ' Test IR object detection circuits. ' ' {$STAMP BS2} ' Stamp directive. ' {$PBASIC 2.5} ' PBASIC directive. ' ' -----[ Variables ]---------------------------------------------------------- ' irDetectLeft VAR Bit irDetectRight VAR Bit i ' -----[ Initialization ]----------------------------------------------------- ' DEBUG "Testing piezospeaker. .." FREQOUT 4, 2000, 3000 F DEBUG CLS,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "IR DETECTORS", CR, "Left Right", CR, "----- -----" ' -----[ Main Routine ]-------------------------------------------------------' DO D FREQOUT 8, 1, 38500 irDetectLeft = IN9 FREQOUT 2, 1, 38500 irDetectRight = IN0 IF(irDetectLeft = 0) THEN HIGH 10 ELSE LOW 10 ENDIF IF(irDetectRight = 0) THEN HIGH 1 ELSE LOW 1 ENDIF DEBUG CRSRXY, 2, 3, BIN1 irDetectLeft, CRSRXY, 9, 3, BIN1 irDetectRight PAUSE 100 LOOP...
View Full Document

This note was uploaded on 04/23/2010 for the course EECC 0306-201 taught by Professor Roymelton during the Spring '10 term at RIT.

Ask a homework question - tutors are online