Parallax USB servo controller
Hello everyone
I am new to parallax and was wondering if someone could point me in the right direction.
I just got my parallax usb servo controller and have tested it under winxp using the PSCI application, all works well. I would like to be able to send commands to the controller via a linux box.
I have compiled the kernel module for FTDI interface and the machine can see it...
gentoo ~ # lsmod | grep ftdi
ftdi_sio·············· 33544· 0
usbserial············· 27684· 1 ftdi_sio
gentoo ~ # lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
I have the following code snippet from the PSC manual,
'{$PBASIC 2.5}
Sdat PIN 15 ' Serial Data I/O pin
Baud CON 396 ' Constant for 2400 baud
buff VAR Byte(3) ' temporary variable
SetBaud:
DEBUG "Setting Baudrate", CR
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCSBR",1,CR]
SERIN Sdat, 6,500, SetBaud, [noparse][[/noparse]STR buff\3]
DEBUG "Baud reply: ", buff(0), buff(1), DEC1 buff(2), CR
STOP
But, how do I issue this to the controller? Do I need to compile this first? Using what?
Im a newby here ;-) so any help would be well appreciated.
Thank you
Stuart
I am new to parallax and was wondering if someone could point me in the right direction.
I just got my parallax usb servo controller and have tested it under winxp using the PSCI application, all works well. I would like to be able to send commands to the controller via a linux box.
I have compiled the kernel module for FTDI interface and the machine can see it...
gentoo ~ # lsmod | grep ftdi
ftdi_sio·············· 33544· 0
usbserial············· 27684· 1 ftdi_sio
gentoo ~ # lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
I have the following code snippet from the PSC manual,
'{$PBASIC 2.5}
Sdat PIN 15 ' Serial Data I/O pin
Baud CON 396 ' Constant for 2400 baud
buff VAR Byte(3) ' temporary variable
SetBaud:
DEBUG "Setting Baudrate", CR
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCSBR",1,CR]
SERIN Sdat, 6,500, SetBaud, [noparse][[/noparse]STR buff\3]
DEBUG "Baud reply: ", buff(0), buff(1), DEC1 buff(2), CR
STOP
But, how do I issue this to the controller? Do I need to compile this first? Using what?
Im a newby here ;-) so any help would be well appreciated.
Thank you
Stuart
Comments
If you don't understand how to send and receive serial data under Linux, then you'll have to figure that out first using whatever your programming language of choice is ... and that's beyond the scope of this forum.