Forums > MaxMSP

Help with serial object

Apr 17 2013 | 5:30 pm

Hey everybody im currently doing a university project and I have to find a way how to control a LED chain from Max Msp via Arduino.

I want to send a list with 4 values from max to arduino over the serial object. The first value which will choose a specific LED and then the three other values sets the colour.


10 0 0 255

My question is "how exactly do I pack together 4 values and send them through the serial object". I have tried a few solutions but it does not seem to work. Can I send four values into (pack 0. 0. 0. 0.) and then connect it to the serial object.. is it that easy? or do I have to use (atoi) to convert the values into ASCII before sending them to (serial a 9600).

I have never used the serial object before so im not sure how to do it!!

hope you can help :)

Apr 17 2013 | 7:19 pm

simplest way to do this is to have the arduino listen for serial events.

then just messages thru serial object, maybe not pack messages, unless you want to code the arduino to break serial strings,

Apr 17 2013 | 7:24 pm
Apr 18 2013 | 12:08 am

I’ve attached a zipped Max patch, Arduino sketch, and schematic that will demonstrate sending RGB values from Max to Arduino to control an RGB LED. Let me know if you have questions.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP