Max Arduino communication


#1

Hello,

So i want to try connecting Arduino to Max. I got Maxuino to work as well as checked out a few other example patches showing simple communication. my problem is that as when using Firmata Arduino is closed and theres no need to program in that IDE but I’m having trouble making the transition from coding with Arduino syntax to operating solely in Max. Not so much a hard/software issue as it is one of understanding. Any guidance would be appreciated.


#2

Hey @MauriceHampton – is there a specific thing you are trying to do? I just posted a little max / arduino communication example here yesterday …


#3

Arduino2Max_Nov2012.zip (11.7 KB)

So far i am just trying to get the max patch attached above to read serial from the Arduino program. When following the instructions to start the max patch doesn’t read even after selecting my serial port. What I’m a bit confused by is that I’m not receiving error messages in either program. I tried combing through the included subpatches but to no end.

I decided to put Maxuino on hold for now due to the syntax understanding issues I mentioned in my olab post. I wanted to try and code in both (i.e. writing code in Arduino then running on Max) to help ease the transition.

I’ve include both in case you wanted to take a look, as well as the readme.


#4

Hm … I compiled and uploaded Arduino Code. Then opened the max patch, selected the serial device, ticked the “start” toggle and all of the numbers are streaming in …

Also, I noticed that this uses exactly the same method of receiving as I suggested in Serial communication with Max, though I don’t think this method supports sending values to the Arduino.


#5

Yeah I still cant tell what the problem is. Tried restarting all programs as well as restarting my computer. Everything else is closed. Not super sure what else to try.


#6

What circuit do you have hooked up to the arduino? what are you expecting to see that you are not seeing?


#7

I’ve noticed that, with working with the arduino IDE and uploading/re-uploading sketches, Max will not automatically connect to the arudino serial port, even with that serial port declared and selected in max. I just send the [serial] object (in max) a reset message, followed by an open message and that clears everything up for me. Sending the [serial] object a getport message will show you which port it is connected to at the moment. Not sure if that will help here but… ?


#8

Yeah, you have to explicitly open and close the serial object in max. It’s
kind of obnoxious. Sometimes you have to recreate the object …


#9

Yeah, you have to explicitly open and close the serial object in max. It’s
kind of obnoxious. Sometimes you have to recreate the object …


#10

I actually have a stolen Arduino code from Andrew Benson called SensorBox,

It’s saved on one of my externals, but I can send the info to you.

(Or you could contact him through his e-mail, or his twitter handle, @pixlpa)

thanks!