Parallax USB servo controller
Timmy
Posts: 10
hi everyone,
just a quick question. I am thinking about buying one of the USB servo controllers, can you still control the servos with code that is running in the basic stamp like what can be done with the standard servo controller, such as below
The following code snippet demonstrates the Position Command by ramping a servo channel 11 from 0 to
255 at ramp rate 7.
'{$PBASIC 2.5}
ch VAR Byte
pw VAR Word
ra VAR Byte
Sdat CON 15
baud CON 396
ra = 7
ch = 11
DO
pw = 1250
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 1000
pw = 250
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 1000
LOOP
tim
just a quick question. I am thinking about buying one of the USB servo controllers, can you still control the servos with code that is running in the basic stamp like what can be done with the standard servo controller, such as below
The following code snippet demonstrates the Position Command by ramping a servo channel 11 from 0 to
255 at ramp rate 7.
'{$PBASIC 2.5}
ch VAR Byte
pw VAR Word
ra VAR Byte
Sdat CON 15
baud CON 396
ra = 7
ch = 11
DO
pw = 1250
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 1000
pw = 250
SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR]
PAUSE 1000
LOOP
tim
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax