Hello all, I am new to pd and dont have any experience with pd to, i am learning. What i am trying to make is a controller for a rs-232 pan/tilt unit. I managed to give commands with zterm and it works fine. Command like pp2500 will set the pan movement to step 2500 for example. First thing i want to try is to give commands like that with Pd.
The settings for the pan/tilt unit are: The host terminal or computer should be set to 9600 baud, 1 start bit, 8 data bits, 1 stop bit, and no parity. Hardware handshaking and XON/XOFF are not used.
Using OSX 10.3.9
The keyspan serial adaptor is: USA19QW181P1.]
I have been looking everywhere to see if i could find an example howto just give simple commands to the pan/tilt unit but i cant find it anywhere.
Would somebody be able to send me a Pd patch for it?
Thanks a lot, cheers
jasper
Hi Jasper,
What camera did you get?
I'm been using Canon and Elmo serial control cameras in PD the last couple months.
For canon and elmo the protocol documentation states the raw bytes one needs to send to the camera. I thought this was the norm so I'm suprised your getting anything out of a terminal program, since I've been no other cameras that consider the ascii meaning of each byte as significant.
Anyhow thats beside the point.
When using the comport object in PD you have to send each byte as a decimal integer. So you only send it messages from 0-255. It is a very low level interface as things like "\n" are just anyther number from 0-255. Marc Lavallee has written a package called ascii that takes 0-255 and makes symbols and lists out of it, it also takes symbols and lists and turns it back into dec bytes.
My pan/tilt command looks like this:
129, 1, 6, 2, 18, 18, 4, 4, 1, 0, 1, 11, 0, 0, 255
where each "," sends a different message one after the other.
I have used the keyspan on OSX using comport and it works fine. I used the version in the CVS in the iem folder, but It does not have a darwin makefile, but copying the makefile directly from the PD externals documentation worked fine. Also since your keyspan is not a ttyS* you'll need to set the comport device name manually. Check out the help patch on how to do this.
I was thinking of releasing an interface abstraction for this elmo camera...
Good luck.
b/.
Jasper van den Brink wrote:
Hello all, I am new to pd and dont have any experience with pd to, i am learning. What i am trying to make is a controller for a rs-232 pan/tilt unit. I managed to give commands with zterm and it works fine. Command like pp2500 will set the pan movement to step 2500 for example. First thing i want to try is to give commands like that with Pd.
The settings for the pan/tilt unit are: The host terminal or computer should be set to 9600 baud, 1 start bit, 8 data bits, 1 stop bit, and no parity. Hardware handshaking and XON/XOFF are not used.
Using OSX 10.3.9
The keyspan serial adaptor is: USA19QW181P1.]
I have been looking everywhere to see if i could find an example howto just give simple commands to the pan/tilt unit but i cant find it anywhere.
Would somebody be able to send me a Pd patch for it?
Thanks a lot, cheers
jasper
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev