Page 90 ·
Robotics with the Boe-Bot
DEBUG "Program Running!"
counter VAR Word
FOR counter = 1 TO 120 ' Loop for three seconds
PULSOUT 13, 850 ' P13 servo counterclockwise
PULSOUT 12, 850 ' P12 servo counterclockwise
PAUSE 20
NEXT
FOR counter = 1 TO 124 ' Loop for three seconds
PULSOUT 13, 650 ' P13 servo clockwise
PULSOUT 12, 650 ' P12 servo clockwise
PAUSE 20
NEXT
FOR counter = 1 TO 122 ' Loop for three seconds
PULSOUT 13, 650 ' P13 servo clockwise
PULSOUT 12, 850 ' P12 servo counterclockwise
PAUSE 20
NEXT
FOR counter = 1 TO 122 ' Loop for three seconds
PULSOUT 13, 850 ' P13 servo counterclockwise
PULSOUT 12, 650 ' P12 servo clockwise
PAUSE 20
NEXT
END