provide better samples and more

two samples now are included
improved the readme (changed from txt to md)
NEO_RGB doesn;t require 400khz support, and 400khz support by default
isn't compiled in
This commit is contained in:
Makuna committed 2014-12-15 18:51:52 -08:00
1 parent a4173d56a3
commit 71dd6e53cf
7 files changed
+297 -220

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#include <NeoPixelBus.h>
#define pixelCount 4
#define colorSaturation 128
NeoPixelBus strip = NeoPixelBus(pixelCount, 8);
RgbColor red = RgbColor(colorSaturation, 0, 0);
RgbColor green = RgbColor(0, colorSaturation, 0);
RgbColor blue = RgbColor(0, 0, colorSaturation);
RgbColor white = RgbColor(colorSaturation);
RgbColor black = RgbColor(0);
void setup()
{
// this resets all the neopixels to an off state
strip.Begin();
strip.Show();
}
void loop()
{
delay(1000);
// set the colors,
// if they don't match in order, you may need to use NEO_GRB flag
strip.SetPixelColor(0, red);
strip.SetPixelColor(1, green);
strip.SetPixelColor(2, blue);
strip.SetPixelColor(3, white);
strip.Show();
delay(3000);
// turn off the pixels
strip.SetPixelColor(0, black);
strip.SetPixelColor(1, black);
strip.SetPixelColor(2, black);
strip.SetPixelColor(3, black);
strip.Show();
}