Shop OBEX P1 Docs P2 Docs Learn Events
Parallax USB servo controller — Parallax Forums

Parallax USB servo controller

TimmyTimmy Posts: 10
edited 2005-06-16 21:15 in BASIC Stamp
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

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-06-16 13:18
    My understanding is that the USB-based PSC has left the BS2 to PSC serial interface enabled. Thus you can bypass the USB part with a BS2 and continue to use the PSC. The USB port is to be used by an attached PC.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-16 14:51
    The USB version can be used (directly) with a BASIC Stamp module.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-06-16 21:15
    Yes, it can be used (directly) with a BS2 -- but the BS2 will NOT be talking over the USB link.
Sign In or Register to comment.