Send data to Max MSP from a button attached to Arduino

Jun 14, 2012 at 7:55pm

Send data to Max MSP from a button attached to Arduino

I don’t know what I’m doing wrong and I’ve searched everywhere. I have an Arduino Duemilanove, Max for Live 5, Live 8.3 and a Button :)

I need to send a bang to Max from the Arduino when the button is pressed. I tried Maxuino, it doesn’t receive any bangs when I short any of the Pins after following the instructions by Maxuino and some other webpages. The PinRead mode is like not working, although I can light up the LED on pin 13 from Max.

Arduino2Max which seems the simplest solution is also not working, since the code provided for the Arduino is outdated and the Arduino program doesn’t accept a variable called BYTE anymore. It recommends you to substitute with Serial.write () but I don’t know what value goes between brackets, tried a few between 1 and 32 and none made the thing read the pins.

So what to do? The idea is that when the button is pressed Max should get a bang, that then can be transformed into MIDI or OSC or whatever, but first I really need to read something from the Arduino.

Thanks in advance!

#46600
Jun 15, 2012 at 8:31am

Hi
Going by the number of posts here requesting help with these prefabs, if you (or anyone) is new to Arduino and Max I would not recommend trying to hack Maxuino or Arduino2Max for your own needs until you’ve learned the basics:

Arduino/File/Examples/Digital/Button

http://cycling74.com/docs/max5/tutorials/max-tut/communicationschapter02.html

http://arduino.cc/en/Serial/Write

Brendan

#167620
Jun 15, 2012 at 2:32pm

Try this instead of Arduino:

http://www.phidgets.com/products.php?category=0&product_id=1011_0

It comes with a Max external.

It was as easy as plugging it into my usb port, installing the driver, starting the max help patch and then shortcutting the digital input (green and yellow line) gives me a 1 message.

#167621
Jun 16, 2012 at 11:28am

+1 bookmarked!

#167622
Jun 20, 2012 at 4:29pm

Nice that looks good Mattijs! However I made it, and would like to post the changes in the Arduino code necessary to actually be able to receive info with Arduino2Max on Max and Max for Live. I had to change a couple of things from the original code, but as soon as u load this on the arduino, open de Arduino2Max patch, click on start and u are ready to go.

Optionally u can open the patcher inside the main window to which the Toggle is connected and change the metro to get data faster.

Try it, it works!!

#167623

You must be logged in to reply to this topic.