Neopixel Matrix With MAX/MSP+Webcam

by dancesandwichdance in Circuits > LEDs

3745 Views, 13 Favorites, 0 Comments

Neopixel Matrix With MAX/MSP+Webcam

IMG_0112.jpg
This guide is for an ongoing project  consisting of a 5x5 LED matrix that outputs pixelated webcam data.  The final version will be approximately 3'x3' and have frosted mylar forms covering the LEDs for diffusion.  Webcam video is proccessed in MAX into black and white with only 25 pixels.  Luminosity data from each pixel is sent to arduino and then a corresponding LED in the matrix.  

I used this guide a lot to figure out more about the NeoPixels http://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library 

MATERIALS + TOOLS

Materials needed: 
25 Neopixel  LED's (get from Adafruit.com)
USB Webcam 
Arduino(I use an Uno but almost any would work because all you need is 5v, ground, and one digital pin)
Wire 
Frosted Mylar 

Tools needed:
Soldering Iron + Solder 
Max/Msp

Soldering

IMG_0112.jpg
IMG_0113.jpg
IMG_0114.jpg
First, we need to solder the LED's in a chain.  The neopixels make this easy by being able to be wired into a strand with on input.  It is important to make the chain a zig zag pattern by moving from left to right and then when you reach the end of a row, you start the next one on the far left side. (think like a typewriter). Using a vice like the one in the photo below works well.  It is crucial to remember that we are spreading the pixels out in a different housing so the wires have to be long enough for equal spacing between each pixel.   

Programming

I am stuck at how to package the neopixel messages.  Using the Firmata sketch in arduino, I am able to open serial communication with MAX/MSP and receive the data created by jit.spill.  Using the simple serial object in max I was able to send that out.  When the data gets to arduino it is just in a long string of numbers and is not being transferred to the neopixels.