LPD8806 Addressable LED Strip Library (32 LEDs)

The write up doesnt go into custom code but checkout my gist for some that I did to start, I tried to clean up the code to make it reader friendly:

I did another project for halloween and made a bunch more effects like pulse and multiple scanners/chasers.

Take a look at my basic project which uses only two colors and you should be able to see how they are done since they are very basic.

strip.setPixelColor(i, 0, 0,0);

i = the pixel location. 0 is the first LED, 1 is the next, etc.
0,0,0 = the color using 21bit (0-127)

strip.show();
This will tell the LEDs to show the last setting.

You can create variable to use for the colors, and loops to set what color to set the strip.

for (int i = 0; i < 160; i++){        
      strip.setPixelColor(i, 0, 0,0);  
      strip.show(); 
    }

This example will turn all LEDS to 0 (off). You could have the .show after the loop but its so fast it doesnt matter in this case.

Again, just play around with some of the basic effects and see what happens. Easiest way to start to understand how the arduino code works.