' {$STAMP BS2} ' {$PBASIC 2.5} ' 2008 mlab.uiah.fi/paja ' Advanced digital out ' Experiencing PULSE OUT with servo motor pServo PIN 12 DEBUG CLS DO ' PULSOUT Pin, Duration ' pin: Pin number (0-15) ' Duration: specifies the duration of the pulse. (BS2: a unit = 2us) PULSOUT pServo, 800 'Generate a pulse on Pin with a width of Period ' period < 750 : turn right ' period > 750 : turn left DEBUG "PULSOUT", CR PAUSE 1000 LOOP