Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

ShiftBrite Library

Overview

Taken from macetech.com.

ShiftBrite is a high-brightness LED module containing red, green, and blue elements. It uses a simple clocked serial interface to receive a 10-bit brightness value for each color, resulting in over a billion possible colors.

Each input is buffered and output on the other side of the module. This allows each ShiftBrite to repeat the signal to the next, allowing longer cable runs between elements without excessive loading of microcontroller I/O pins.

ShiftBrite elements feature current control and automatic overtemperature control (an overheating channel driver will shut off until it has cooled). Each channel can also be adjusted with a separate current control register, for fine tuning of each LED if close brightness matching is necessary. The integrated voltage regulator powers the internal logic, allowing a single 5 to 9 volt supply rail to power the ShiftBrite chain.

Library

You can get the library here

Use

To use it, include the library by adding #include "ShiftBrite.h" at the top of your sketch.

Then make a ShiftBrite object like this: ShiftBrite SB(10);. This assumes your lines to the ShiftBrite starts with the clockpin on pin 10, and continues with enable, latch, and data.

If your pins aren't right in a row, you can explicitly define them like: ShiftBrite SB(datapin,latchpin,enablepin,clockpin);

to do the same thing as above would be: @@ShiftBrite SB(13,12,11,10);

You can then set 10 bit colors by calling the setColor(r,g,b) method of the object.

If you want to use 5 bit colors you can use setColor5b(r,g,b) or as three 5 bit values packed into a 16 bit value setColor5b(packedcolors)

The library includes 3 examples of all three ways of setting the colors.


This library doesn't work anymore, I have wrote a new library that does work. It can be found @ http://code.google.com/p/shiftbritehughesyarduino/