' Robotics with the Boe-Bot - RightServoTest.bs2 ' Right servo turns clockwise three seconds, stops 1 second, then ' counterclockwise three seconds. ' {$STAMP BS2} ' {$PBASIC 2.5} DEBUG "Program Running!" counter VAR Word FOR counter = 1 TO 122 ' Clockwise just under 3 seconds. PULSOUT 12, 650 PAUSE 20 NEXT FOR counter = 1 TO 40 ' Stop one second. PULSOUT 12, 750 PAUSE 20 NEXT FOR counter = 1 TO 122 ' Counterclockwise three seconds. PULSOUT 12, 850 PAUSE 20 NEXT END