Arduino and max msp: getting sensor data into max


It is my first time with the arduino interface, and I would like to get sensor data from ALL the arduino analogue input pins into max. Have anyone of you worked with this before? Please see my unsuccessful try below:

I have some arduino code that supposedly should get sensor data from all anaologue inputs (sensor inputs) to max:

/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor

This example code is in the public domain. */

void setup() { Serial.begin(9600); }

void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue); }

On the other end of the line I have this max patch:

----------begin_max5_patcher---------- 990.3oc2XlsbaBCFE9Z6mBMbsahVP.tSuoOGYxzQ1n3nV.4hjaSZl9tWjDXS VPfiswNclL3H4EN5iy+QKOMcRvB4CbU.3yfa.Sl7zzISrcY5XRc6IA4rGVlw T1OVvRYdNuPGLy8dZ9CZa+eATxYo.EuPIKAoLMCv+Eu7Q.FBxEYYBEeorHU0 7EWyzKuWTr5ak7kZm.Pn3qfy.IHyULw1.CuBBts96HRs2J4hu+ILr4G5NYgt fkysu0WKErrl2oXStnHiqsBGsqS4FcSuvV+HJwer+HH7UMcutjWMfzLsPVzV nITi1hmatBqu.t07c96zolKyFHMqTyBdoGlPvVZPPIlWnPeLAkbTXB1OSbeR 8iq4NEFHLtAPvBVwpfsxpCx0LbBGAzgihGN5ht3QWyvYTPGJb3nid4it5gSX xAiNUlH0K5hgtaEogYy.nv1nqYvQgvsit13LbOfFpK5D797E7eWIgWEsuoXM a4OpPV6+7kiCsVTrKkDgodsO3ih8gtm1m6xjLqAp2+4XRx0khcSc9FjKLpE3 bt0N414bBPmulPgm9nHTzvm.jbAjD8NXPkOqRA8WPMHFfOKLXaMy6mB4bkhs h+5ZFYoFrvWhqsnAEYy3CstECndSCx9NWE1ar6PoyQMCQwypF5.H.4ywfsNF DwxlHrOGSB5nXYH6ITrNkY6d88Aot2NxxLQ0jV2yK4.srpkTU8O2yq1ghYfA L1Je.L1wLRM5h7VyEcRyhOgXQtlWrOTYN8Y3vKURvWZToqHFq4n+poZy.Ytu HlDxGnHFuYtLeDghZ4.7G5hl+AhHCsvYEuBPfLgRCj20t5Q0+1pPI0yf68DN RBuzJezxUqx38t70P2x92d8M2cVaA21qfNF69wrhr91SHctauY3VyPZtdLmp 9m4bcoDr6rp5jYty7Jx6NkRhOK0QmfUz0ytfPt8PWWl3VBSmgKj+GVQmM8fA lGA62pfoQ6N7wN8Jm0iB7zD8VubkqcKkqUjKfUjBTZVo9ZkVtFXQmGN5NHs5 SnIw+triGqPX6cOHST7xii2N.L8+bzojaJW1v8lCRADtcPjxUZQw1r1a1cDw fciz6Eoo7h1JLWjtVV8XrVDc7fbnZJ442tNzDd+zDkdE07fyERTELzz5.E6K zwaKV7nxOqjP8HIx3KodejFN9ZB2mlniulH8oonKvxQ33po3AnojQN1hbBzD h3RpnXyK0gXlFGpXQCQriaHgUS8kaY1W3HpIB8xyn8BDbjLZQPq2BOukQyz3 PE6IopH1pRLD0RrlFGpXGTUQ739zdPZBs2qFxra.r63dsQLwubarUM96z+QT KkMI -----------end_max5_patcher-----------

Right now I don't seem to get the sensor data from the arduino into max - I wonder what the problem is?

Can anyone help me?

Thanks a lot,


Don't understand this, sorry:



Maxuino worked great in max 5 and made it easy to both get sensor data and at the same time control LED lights through the pwm output from max over the arduino.

However, maxuino doesn't seem to work with max 6.

Are there other ways of getting sensor data from the arduino into max AND at the same time controlling PWM from max to the arduino?

Thanks for your help,


Threads merged. Don't just start a new thread please on the same topic. Perhaps if you explained a bit more about what a max is? Like, for example, a link to it.

Max is a coding language similar to Processing, PD, Supercollider etc.

He's trying to send data over the serial connection to control objects within Max/MSP, I'm trying to do the same thing and have had success with the serial monitor within the IDE, but when I try and get the same values into Max, I get stuttered messages ranging from 0-50 and nothing similar to what I see in the serial monitor.

I'm using an Arduino mega with a wireless breadboard and a 10k potentiometer. Using the 5v and gnd ins and outs and using A0 as my data in.