Tutorial for modifying Arduino2Max to output to Arduino from Max

Oct 23, 2011 at 1:29am

Tutorial for modifying Arduino2Max to output to Arduino from Max

I’ve been working on this and thought I’d post it for everybody. Arduino2Max is really lightweight, but doesn’t allow for output from Max to Arduino. This uses a crude but functional method to get data flowing the other way.

Example Arduino code and Max patch included as well as a basic (i.e., for beginners) PDF tutorial.

Thought this might be useful for somebody in the future searching the forum.

#59497
Oct 25, 2011 at 6:28am

Wow! Exactly what I was looking for.

I’m finally at a place where I’m comfortable programming with Max, but navigating Arduino has been slow. Thank you for adding this simple workaround to something that I’ve already spent hours trying to figure out.

#214115
Oct 25, 2011 at 2:11pm

I’m glad it’s helpful. You should check out Maxuino if you don’t want to mess with Arduino at all. I posted a Maxuino tutorial on the forum a few days ago too. I’ve been having a bit of trouble with it in Windows, but on Mac it’s great.

#214116
Oct 28, 2011 at 4:52am

To download the arduino code they ask me for a password ?

#214117
Oct 28, 2011 at 1:14pm

The Arduino code linked to at the beginning the tutorial just from the Max Serial Communication tutorial (http://www.cycling74.com/docs/max5/tutorials/max-tut/communicationschapter02.html). That part of my tutorial is just to make sure people understand how serial communication works.

My modifications to Arduino2Max can be accessed through the second link above, which is also found further down in the tutorial. I’ll try to upload a modified version of the tutorial to change that link at the beginning.

#214118
Oct 28, 2011 at 1:16pm

I thought I’d be able to edit the original post, but it looks like I can’t. Here’s an updated version of the tutorial.

#214119
Jan 19, 2012 at 2:59pm

Hi,

I'm completely new to MAX/MSP and I've been trying to follow the tutorial about serial communication: “Max Comm Tutorial 2: Serial Communication”. Funny thing happens: if I have my Arduino plugged into the USB, the “print” button on top of the tutorial patcher won't “press”. It looks frozen, and the L LED on the board flashes fast twice. Also, the tutorial says ” the available serial ports on your computer will appear in the Max window, along with their letter mappings.” but nothing appears. I'm using Arduino Duemilanove, if that counts for anything, and Maxuino worked on the same computer& board. I was able to turn digital pins HIGH and LOW and light some LEDs.

Now back to the sketch.
If I unplug Arduino, then the button looks like it's being pushed down when I click it.

I'm not sure if this is normal behaviour or if I need to update something on my system in order for MAX/MSP to work properly.

Any help is much appreciated. Thank you!
Cristian

[attachment=182645,3227]

Attachments:
  1. clickingonPRINT.jpg
#214120
Jan 21, 2012 at 8:11pm

I have no idea why the print message is behaving that way. Sorry I can’t help.

#214121
Mar 22, 2012 at 3:42am

This is great though I can’t find any way to send larger values or negative numbers via serial to the Arduino.

Any ideas?

#214122

You must be logged in to reply to this topic.