Maxuino is an open source project for quickly and easily getting the Max/MSP/Jitter talking to Arduino compatible micro-controllers. This allows Max to read analog and digital pins, write to digital and PWM pins, control servos, drive stepper motors and much more.
We have created a series of video tutorials (see the videos and tutorials page) or you can follow the text instructions below.
- Purchase an Arduino or Arduino compatible board. Companies like Sparkfun or Adafruit have great starter kits.
- Download the free Arduino software from www.arduino.cc
- Download Maxuino for free from the download page at maxuino.org
- Download the free “OSC-route” Max external from CNMAT
- Add the entire Maxuino folder and the OSC-route object to your Max filepath
- Depending on your board you might need to install a driver for the serial port. (see http://arduino.cc/en/Guide/HomePage )
- Connect USB cable to Arduino and your computer.
- Start Arduino software.
- Select your board from Tools -> Board
- Select your Serial connection from Tools -> Serial Port
- Open the Firmata program by going to File -> Examples -> Firmata -> StandardFirmata
- Upload the Firmata program to your board by pressing the upload button or File -> Upload
- When the upload is finished, you can close the arduino software.
- Never have to learn to program Arduinos! (unless you want to)
- Add your desired inputs or outputs to your board (look at tutorials like these for how to wire them http://arduino.cc/en/Tutorial/HomePage but you can ignore the programming since you are using Firmata)
- Open maxuino.help.maxpat
- The patch is designed to help introduce the user to the multiple ways of communicating with Maxuino. Maxuino is made of two major parts: the Maxuino GUI and the maxuino.maxpat. The GUI is a easy to use interface that is M4L compatible and also an OSC translator. The maxuino.maxpat translates Max commands into Firmata commands and sends them out of the serial port and translates the other way when incoming messages are received.
- Using the upper right box, select the serial port for your board.
- Next you need to set the modes for each of the pins you will use. The easiest way is to use the GUI. If it is not open, press the /gui message button in the middle left of the patch. You will see that you can also select the serial port from here as well as select the particular board you are using. Choosing a board will grey out pins and options that are not available for that board. There are also options to save and load a pin setup. The analog inputs are on the left (and can be turned on or off), and the digital pins are on the right and have 7 modes:
- Digital input
- Digital output
- Analog input (some boards have pins that can do both modes)
- PWM output
- Stepper Motor Step
- Stepper Motor Direction
- Once a pin mode is chosen, either the input information will begin to show up or you can use the various controls to manages your outputs.
In addition to using the GUI, you can simply send commands straight into the maxuino.maxpat, or even send OSC formatted commands (allowing for more simultaneous control) to the GUI from Max or even other software.
We have included the M4L file so you can incorporate it into your Live setup.
Enjoy playing with Max and your new inputs and outputs. If you have any questions check out Maxuino.org where you can learn the full protocol, post a comment and read about more features.
Below you will see an image that could give you some guidance on how to wire various sensors.