Montag, 14. Februar 2011

Arduino & Max/Msp/Jitter - Serial Communication

Ok, I recently put together a small project trying together my Arduino and Max by Cycling 74. While sending serial information from Max to Arduino is amazingly trivial, doing it the other way is not.

If you want to send information from Max to arduino, its sufficinat to just create a serial object and set the correct boud rate (for me I type in [serial c 9600] where c is port 3 and 9600 is the boud rate). Then you could connect i.e. a slider, and *magic* your sanding information. In arduino all you have to do is initilazie the serial and then use serial.read

Ok, the other way round proved to be a bit more tricky (though possibly, once I had figured it out, possibly easyer than serial communication with processing, and thats quite easy)

I made to template files. One for Arduino and one for Max. If you load the .pde file into arduino and open the Maxpatcher, you should be able to send date the other way round. There are instructions in the .pde file on how to set things up

click here to download

(this works on a p.c. running windows 7 it should work on any other operating system as well, but honestly I have no idea.)

I used this here

Hope someone out there finds this helpful.

Cheers

p.

1 Kommentar:

  1. Just was pointed here
    http://www.arduino.cc/playground/Interfacing/MaxMSP#arduino2max

    By MikeR77 of the arduino forums.

    A much nicer and more comprehensive solution than what I offer here...

    AntwortenLöschen