Go Down

Topic: Arduino with Max/MSP? (Read 783 times) previous topic - next topic


Has anyone figured out how to use the max [serial] object to communicate with arduino?



its actually very simple, but you need to make sure you have the serial usb drivers installed first. are you using a mac or a pc? i'll post up my patch over the weekend for you.


I'd definitely like to see a patch that uses connection between Max and arduino.

I had a bit of trouble actually getting the serial object to read the incoming data. I found out that (on OSX Panther anyway) two applications cannot access the serial port at the same time, so i had to close the arduino IDE.

I wrote a very simple program to send data back to max:


I should be seeing a simple incrementing count. It's what shows up in the arduino serial inspector, but max returns different data. I can tell that it's related to the count, but this is how it looks:

data: 49 51 53 48 10
data: 49 51 53 49 10
data: 49 51 53 50 10
data: 49 51 53 51 10
data: 49 51 53 52 10
data: 49 51 53 53 10
data: 49 51 53 54 10
data: 49 51 53 55 10
data: 49 51 53 56 10
data: 49 51 53 57 10
data: 49 51 54 48 10


I (sort of) figured it out; the [serial] is returning the numbers being sent to it, but in ascii by place!

int: 305
ascii: 51 48 53 10

int: 306
ascii: 51 48 54 10

I think 10 is the newline ascii code?



OK, sorry for not RingTFM and for pretty much blogging in this thread.

I realized that the answers to my questions were only two clicks down from the arduino front page in the reference section.
(I'll start a new thread so people dont have to read down this far)


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131