PSC and continuously rotating servo
Hi,
I testing the PSC with BS2SX and continuously rotating servo. Just trying to get the servo move a bit and move back, can't be that difficult but still not getting it to work....servo starts to spin, but doesn't change rotating direction.
here's the code:
' {$STAMP BS2sx}
' {$PBASIC 2.5}
ch VAR Byte
pw VAR Word
ra VAR Byte
sDat CON 15
Baud CON 1021
ra = 1
ch = 1
DO
pw = 2500
SEROUT sDat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 20
pw = 1250
SEROUT sDat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 20
LOOP
I testing the PSC with BS2SX and continuously rotating servo. Just trying to get the servo move a bit and move back, can't be that difficult but still not getting it to work....servo starts to spin, but doesn't change rotating direction.
here's the code:
' {$STAMP BS2sx}
' {$PBASIC 2.5}
ch VAR Byte
pw VAR Word
ra VAR Byte
sDat CON 15
Baud CON 1021
ra = 1
ch = 1
DO
pw = 2500
SEROUT sDat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 20
pw = 1250
SEROUT sDat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 20
LOOP