connecting two arduino boards + getting stable readings

Hey Everybody

Im currently doing a project with 12 photocells, which will send analog input to MaxMsp. Im using two arduinos- and it is possible to read from both boards at the same time, BUT.. My problem is that the connection seems to be very unstable when I read from both at the same time. I need som help to figure out how I can get stable readings from two arduinos

Im using two arduino Uno and Mac

Mvh. Bjørn Dam Larsen

What exactly do you mean by "read from both boards at the same time" ?

How is everything connected?

...R

I have two arduino uno boards- each have 6 photocells connected via analog input. Both boards are connected with USB.

I am using MaxMsp to read the values. On each board I uploaded the arduino script for ARDUINO2MAX. I alos made sure each board is connedted to a specific serial port.

I can get values from both boards into MaxMsp, thats not a problem. The ISSUE is that the values gets unstable when I use two arduino boards at the same time. It works fine if I only use one board at the time.

Arduino2Max_Nov2012_V_6.ino (1.37 KB)

bjoerndamalrsen:
The ISSUE is that the values gets unstable when I use two arduino boards at the same time. It works fine if I only use one board at the time.

Is it possible the PC program is closing a serial port when it switches to read the other port?
It should keep both ports open all the time.

...R

Sounds like a solution, how can I make sure both are open at the same time?

bjoerndamalrsen:
Sounds like a solution, how can I make sure both are open at the same time?

Just don't close them.

I know how not to close ports in Python.
I don't know anything about MaxMsp.

...R