#include <FastLED.h>

//define the pin used for connecting the WS2812 LED Ring
const int LED_PIN = 7;

//define the numebr of LEDs of the LED Ring
const int NUM_LEDS = 16;

//define an CRGB array
//this type contains the LEDs with three one-byte data
//members for each color (Red, Green, Blue)
CRGB leds[NUM_LEDS];

void setup() 
{
  //initialize the FastLED with the parameters defined above
  FastLED.addLeds < WS2812, LED_PIN, GRB > (leds, NUM_LEDS);
}
void loop() 
{
  //each led will turn RED
  for (int i = 0; i <= 16; i++)
  {
    //using the CRGB function we can set any LED to any color
    //using the parameters of Red, Green and Blue color
    leds[i] = CRGB(255, 0, 0);
    //set all leds to the given color
    FastLED.show();
    delay(50);  
  }

  //each led will turn GREEN
  for (int i = 0; i <= 16; i++)
  {
    leds[i] = CRGB(0, 255, 0);
    //set all leds to the given color
    FastLED.show();
    delay(50);  
  }

  //each led will turn BLUE
  for (int i = 0; i <= 16; i++)
  {
    leds[i] = CRGB(0, 0, 255);
    //set all leds to the given color
    FastLED.show();
    delay(50);  
  }
}
