Robotics with the Boe-Bot text v2.2
Page 330 · Robotics with the Boe-Bot 
' -----[ Initialization ]----------------------------------------------------- 
DEBUG CLS, 
 "Click transmit windowpane,", CR, 
 "then press enter to begin", CR, 
 "frequency sweep...", CR, CR, 
 " OBJECT", CR, 
 "FREQUENCY DETECTED", CR, 
 "--------- --------", CR 
' -----[ Main Routine ]------------------------------------------------------- 
DO 
 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 
√  Click the upper of the two window panes shown in Figure G-1. 
√  Press the Enter key. The frequency response data will appear as shown in the 
figure. 










