Copyright © Parallax Inc.
Page 5 of 8
Demonstration Program
'{$STAMP BS2}
'{$PBASIC 2.5}
counter VAR Word
DO ' Repeat forever
FOR counter = 1 TO 100 ' Loop for 2 seconds
PULSOUT 0, 850 ' Servo counterclockwise
PAUSE 20
NEXT
FOR counter = 1 TO 100 ' Loop for 2 seconds
PULSOUT 0, 650 ' Servo clockwise
PAUSE 20
NEXT
FOR counter = 1 TO 100 ' Loop for 2 seconds
PULSOUT 0, 750 ' Servo stop
PAUSE 20
NEXT
LOOP
A servo can drain a fresh 9 V battery in less than 20 minutes. For tips on using a separate power
supply for a servo on the HomeWork Board, see the Parallax servos product pages (see For More
Information, at the end of this document).
Propeller BOE and Propeller QuickStart
Propeller BOE Wiring Diagram