Shop OBEX P1 Docs P2 Docs Learn Events
USB Servo Controller Question — Parallax Forums

USB Servo Controller Question

slaytonslayton Posts: 3
edited 2009-02-27 20:48 in General Discussion
Hi,

I'm trying to control the parallax USB Servo controller with python...

I can connect to the controller with over USB but I can't get the command string correct:


can anyone provide me with a valid example of the command string I write to the controller?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-27 17:09
    Slayton, this is the BASIC Stamp Forum, so members would be able to help you with PBASIC code to cotnrol the PSC here. I will move your message to the Sandbox where you can get additional help since I know someone posted Python code in the past for this device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • slaytonslayton Posts: 3
    edited 2009-02-27 17:59
    I've been reading the Servo Controller document but I can't get it to work... I've been trying to following code but it doesn't seem to be working:
    from serial import Serial
    s = serial('/dev/bstamp')
    s.baudrate=2400
    s.stopbits=2
    
    str_out = '!SCVER?\n'
    s.write(str_out)
    str_in = s.readline()
    
    


    str_in is !SCVER?\n

    Not sure what I'm doing wrong here....
  • slaytonslayton Posts: 3
    edited 2009-02-27 20:48
    I found this site:
    www.adamthree.com/index.php?page=files
    which has a python module designed to control the Parallax Servo Controller
Sign In or Register to comment.