Page 1 of 1

Flowstone interfacing to Parallax Propeller

PostPosted: Mon Oct 25, 2010 8:54 pm
by fixstuff555
Hi all,

I am interested in using a Parallax Propeller Servo Controller, Parallax #28830 interfaced to Flowstone. The API mechanism may be similar to the Lynxmotion interface, and I was wondering what would be recommended as a starting point to accomplishing this with the Propeller. I have a lot of interest in both the Propeller and Flowstone, so I believe the two would be a real good fit. Any ideas on how to go about doing this? I'm an intermediate level Spin programmer, and a beginner Flowstone user, but I have ran all of the demos on the forum (found some bugs in that stuff btw :) but they were definitely usable examples!)

http://www.parallax.com/

thanks

Re: Flowstone interfacing to Parallax Propeller

PostPosted: Wed Oct 27, 2010 12:19 am
by admin
I just had a quick look, and it is very similar as you say to the LynxMotion board. ie. Serial command driven. The main difference is that is has a USB to serial converter on the board from FTDI (which is great!).
So it should be quite a simple job to modify the LynxMotion examples and just change the codes sent to the board!

The full protocol is described in the user manual: http://www.parallax.com/Portals/0/Downl ... B-v1.0.pdf

For this board you have a simple string to control each servo:

"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR

Preamble, Channel, Ramp Speed, LSB, MSB, CR (String Terminator)

So the centre a servo (1.5ms) = !SC,0,32,238,2,13

Where:
!SC = Preamble
ch = 0 = servo 1 (0-15)
ra = 32 (Half speed 0 - 63)
pulse width = 1.5ms = 750*2us = 02EEh,or 02, 238 Decimal
LSB = 238
MSB = 2
<cr>= 13(ASCII)

To send the data in FlowStone you can send each byte individually using the com port module as per the LynxMotion examples. Remember the default baud rate is 2400.

Give it a go and see if it works?