FrequencySweep

FrequencySweep - "then press enter to...

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

View Full Document Right Arrow Icon
' -----[ Title ]-------------------------------------------------------------- ' Robotics with the Boe-Bot - FrequencySweep.bs2 ' Test IR LED/detector response to frequency sweep. ' ' {$STAMP BS2} ' Stamp directive. ' {$PBASIC 2.5} ' PBASIC directive. ' ' -----[ Variables ]---------------------------------------------------------- ' crsrPosRow VAR Byte irFrequency VAR Word irDetect VAR Bit distance VAR Nib dummy VAR crsrPosRow d ' -----[ Initialization ]----------------------------------------------------- ' DEBUG CLS, "Click transmit windowpane,", CR,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "then press enter to begin", CR, "frequency sweep. ..", CR, CR, " OBJECT", CR, "FREQUENCY DETECTED", CR, "--------- --------", CR ' -----[ Main Routine ]-------------------------------------------------------' DO D DEBUGIN dummy crsrPosRow = 6 FOR irFrequency = 30500 TO 46500 STEP 1000 crsrPosRow = crsrPosRow + 1 FREQOUT 8,1, irFrequency irDetect = IN9 DEBUG CRSRXY, 4, crsrPosRow, DEC5 irFrequency DEBUG CRSRXY, 11, crsrPosRow IF (irDetect = 0) THEN DEBUG "Yes" ELSE DEBUG "No " PAUSE 100 NEXT LOOP...
View Full Document

Ask a homework question - tutors are online