#include #define PIN 14 #define ledCount 60 Adafruit_NeoPixel strip = Adafruit_NeoPixel(ledCount, PIN, NEO_GRB + NEO_KHZ800); //first number controls the amount of pixels you have (add 4 so the drip falls off the edge) //Adafruit_NeoPixel stripOld = Adafruit_NeoPixel(ledCount, 7, NEO_GRB + NEO_KHZ800); //Adafruit_Neopixel stripNew = Adafruit_NeoPixel(ledCount, 8, NEO_GRB + NEO_KHZ800); void setup() { Serial.begin(9600); // open the serial port at 9600 bps: strip.begin(); strip.show(); // Initialize all pixels to 'off' } void loop() { breathe(50, 250, 255,255,255); // Pause; Number of steps; Full-on R,G,B values } // Pause = delay between transitions // Steps = number of steps // R, G, B = Full-on RGB values void breathe(int pause, int steps, byte R, byte G, byte B) { int tmpR, tmpG, tmpB; // Temp values // Fade up for (int s=10; s<=steps; s++) { tmpR = (R * 0.5 * s) / steps; // Multiply first to avoid truncation errors tmpG = (G * 0.5 * s) / steps; tmpB = (B * s) / steps; for (int i=0; i10; s--) { tmpR = (R * 0.5 * s) / steps; // Multiply first to avoid truncation errors tmpG = (G * 0.5 * s) / steps; tmpB = (B * s) / steps; for (int i=0; i