#include "FastLED.h"

// fast led constants
#define DATA_PIN    2       // change to your data pin
#define COLOR_ORDER RGB      // if colors are mismatched; change this
#define NUM_LEDS    100       // change to the number of LEDs in your strip

// change WS2812B to match your type of LED, if different
// list of supported types is here:
// https://github.com/FastLED/FastLED/wiki/Overview
#define LED_TYPE    WS2811

// this creates an LED array to hold the values for each led in your strip
CRGB leds[NUM_LEDS];

void setup()
{
  
  // the wiki features a much more basic setup line:
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);

}


void loop() 
{

  for(int dot = 0; dot < NUM_LEDS; dot++)
  { 
    int nearled = dot + 1;
    int farled = dot + 2;

    leds[dot] = CRGB::Green;
    leds[nearled] = CRGB::Red;
    leds[farled] = CRGB::Blue;
    delay(50);
    
    FastLED.show(); 
    delay(300);
    
    // clear this led for the next time around the loop
    leds[dot] = CRGB::Black;
    leds[nearled] = CRGB::Black;
    leds[farled] = CRGB::Black;
    delay(50);
    FastLED.show(); 
    
  }

}
