Pages: [1]   Go Down
Author Topic: Reading serial with multiple software  (Read 891 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i need to read serial from arduino with pure data and blender simultaneously, since just one software can listen the serial port what's the best way to duplicate the serial port on osx? my application is in real time so i need to be fast and use cpu as less as possible.
thanks for help   
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 5
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Duplicating the serial port on osx would not solve the problem, without also duplicating it on the Arduino side.

Your best option is probably to use MIDI.  Send MIDI over the serial port from Arduino. I think it's possible to have to apps listen to he ame MIDI stream.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12428
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the baudrate?  (how fast)
What is the expected bytes per second? (how much)

Note the above are two different questions!

Is the serial bidirectional?


If baudrate is 38400 or below you could place an Arduino in between that listens to the producer and spits it out over two software serials in parallel.

you can google "serial splitter for windows" to find apps like - http://www.curioustech.net/xport.html -
maybe such an app solves your problem?



Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The communication is not bidirectional, as i have to read serial from arduino to control camera movement in blender and audio panning in pure data, i would use midi as last chance, i was wandering if there is a way to read the serial port from arduino and virtually duplicate it in two different port via software on osx so that i will read one port with blender and the other with pure data.

for the baud rate and expected byte for second i have to go further with calculations as i can process data arduino side or computer side (that will change the amount of data i need to send from arduino and so the baudrate).

From what i read i need to stay between 30Hz and 60Hz (i mean i need to read a packet of data from blender 30-60 times per second).

I think a serial splitter would be the best choice, do you have some suggested ways or software to split a serial port on osx?

tx
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
How do you read the serial port? Can't you duplicate the stream of data after you read the serial port?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12428
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you only read the data you might just split the signal wire in two, works most of the time... (don't forget to connect GND too)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, today i made some progress, i will be shurely under 11400 baud, probably i will use 9600, i will read serial stream from arduino usb. I don't want to duplicate the port after the first software reading (from the first software to the second one) because i want to parallelize the serial stream from arduino to the two different software, i think there is a way to virtually duplicate a serial port on osx... just i haven't found it yet... i'll let you know
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, i made some steps, i think the best choice is to use thinkerproxy2 to virtually duplicate arduino serial port, i will do some tests and post the results
Logged

Offline Offline
Edison Member
*
Karma: 4
Posts: 1723
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im a windows guy but couldn't you read your stuff on processing, while having processing write to a virtual com port would the other program reads?
Logged

Pages: [1]   Go Up
Jump to: