' {$STAMP BS2} ' {$PBASIC 2.5} DEBUG "Program Running!" pulseCount VAR Word FREQOUT 4, 2000, 3000 DO PULSOUT 13, 850 PULSOUT 12, 716 PAUSE 20 LOOP
This command was used to make the Boe-Bot go in a circle for 1yard
' {$STAMP BS2} ' {$PBASIC 2.5} DEBUG "Program Running!" DEBUG "WHISKER STATES", CR, "Left Right", CR, "------ ------" DO DEBUG CRSRXY, 0, 3, "P5 = ", BIN1 IN5, " P7 = ", BIN1 IN7 PAUSE 50 LOOP DO IF (IN5 = 0) AND (IN7 = 0) THEN FREQOUT 4, 100, 4000 FREQOUT 4, 100, 4000 GOSUB Back_Up GOSUB Turn_Left GOSUB Turn_Left ELSEIF (IN5 = 0) THEN GOSUB Back_Up GOSUB Turn_Right ELSEIF (IN7 = 0) THEN FREQOUT 4, 100, 4000 GOSUB Back_up GOSUB Turn_Left ELSE GOSUB Forward_Pulse ENDIF LOOP
This command was used to make the Boe-Bot whiskers active and make sure they are working also making the boe-bot move
' {$STAMP BS2} ' {$PBASIC 2.5} DEBUG "Program Running!" counter VAR Nib pulseCount VAR Word FREQOUT 4, 2000, 3000 Main: FOR counter = 1 TO 3 GOSUB Forward GOSUB Right_Rotate120 NEXT END Forward: FOR pulsecount = 1 TO 230 PULSOUT 13, 850 PULSOUT 12, 650 PAUSE 20 NEXT RETURN Right_Rotate120: FOR pulsecount = 1 TO 38 PULSOUT 13,850 PULSOUT 12,850 PAUSE 20 NEXT RETURN
This command was also used to make the Boe-Bot go in a triangle for 1 yard