NeoPixel Matrix 8x8 RGB LED
The NeoPixel Matrix 8x8 RGB LED is composed of 64 individually addressable 24-bit color LEDs controllable from a single microcontroller pin. There are two 3-pin connection ports and wiring is relatively simple. Connect an external 5V voltage source to the VIN pin, connect the DIN pin to any Digital Out pin on the mbed, and use a common ground. Expect to see 1-2A of current per panel for common use, although up to 3.5A may be reached if all LEDs are set to bright white. Exceeding about 6.5V could damage the LED matrix. If you need more "blinky", you can chain the LED matrices together by connecting the DIN of a second panel to the DOUT of the first panel. Be mindful of power usage as you increase the number of panels in the chain.
Library for controlling a strip of Adafruit NeoPixels with WS2812 drivers. Because of the strict timing requirements of the self-clocking data signal, the critical parts of code are written in ARM assembly. Currently, only the NXP LPC1768 platform is supported. More information about NeoPixels can be found at http://learn.adafruit.com/adafruit-neopixel-uberguide/overview
|NeoStrip (PinName pin, int N)|
|void||setBrightness (float bright)|
Set an overall brightness scale for the entire strip.
|void||setPixel (int p, int color)|
Set a single pixel to the specified color.
|void||setPixel (int p, uint8_t red, uint8_t green, uint8_t blue)|
Set a single pixel to the specified color, with red, green, and blue values in separate arguments.
|void||setPixels (int p, int n, const int *colors)|
Set n pixels starting at pixel p.
Reset all pixels in the strip to be of (0x000000)
Write the colors out to the strip; this method must be called to see any hardware effect.
An example program using my NeoStrip library to control an Adafruit 8x8 NeoPixel matrix (http://www.adafruit.com/products/1487)
The example program uses pushbuttons to display three different patterns on the LED matrix with varying degrees of brightness. To create your own pattern, find or create an image and extract the color information from it. For example, MATLAB was used to obtain the values for the GT image, which was made in Adobe Photoshop. After obtaining the pattern, mimic the code found in gt.h and adjust the main program to read your pattern.
|mbed||NeoMatrix LED||External 5V Power Supply|
|p17 (or any DigOut)||DIN|
Picture of Example Program
Video Demonstration of Example Program
See the NeoPixel Uberguide for more detailed information about hardware specifications. It also has information about creating your own library if you choose not to use the one above.
Check out Adafruit for more fun LED options.
Please log in to post comments.