https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels

https://github.com/adafruit/Adafruit_NeoPixel

 

#include <Adafruit_NeoPixel.h>

int const pixel_count = 36;
int const output_pin = 6;

Adafruit_NeoPixel led_strip = Adafruit_NeoPixel(pixel_count, output_pin, NEO_GRB + NEO_KHZ800);

void setup() {
led_strip.begin();
led_strip.show();
}

Commands: (0 to 255 for brightness, red, green, blue.)

led_strip.setBrightness(brightness);

led_strip.setPixelColor(address, red, green, blue);
led_strip.show();