#include // How many leds in your strip? #define NUM_LEDS 4 // For led chips like WS2812, which have a data line, ground, and power, you just // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN // Clock pin only needed for SPI based chipsets when not using hardware SPI #define DATA_PIN 9 #define CLOCK_PIN 13 // Define the array of leds CRGB leds[NUM_LEDS]; void setup() { // Uncomment/edit one of the following lines for your leds arrangement. // ## Clockless types ## // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is assumed // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // ## Clocked (SPI) types ## // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // FastLED.addLeds(leds, NUM_LEDS); // BGR ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // BGR ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // BGR ordering is typical // FastLED.addLeds(leds, NUM_LEDS); // BGR ordering is typical } void loop() { // Turn the LED on, then pause leds[0].setRGB(10, 0, 0); leds[1].setRGB(0, 10, 0); leds[2].setRGB(0, 0, 10); leds[3].setRGB(10, 0, 0); FastLED.show(); delay(500); leds[0].setRGB(0, 10, 0); leds[1].setRGB(0, 0, 10); leds[2].setRGB(10, 0, 0); leds[3].setRGB(0, 10, 0); FastLED.show(); delay(500); leds[0].setRGB(0, 0, 10); leds[1].setRGB(10, 0, 0); leds[2].setRGB(0, 10, 0); leds[3].setRGB(0, 0, 10); FastLED.show(); delay(500); // Now turn the LED off, then pause //leds[0] = CRGB::Black; //FastLED.show(); //delay(500); }