/* // Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 60

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
*/


#include <Adafruit_NeoPixel.h>

#define LED_PIN    6
#define LED_COUNT 16

Adafruit_NeoPixel ring(LED_COUNT, LED_PIN, NEO_RGBW + NEO_KHZ800);
//               number of LEDS, pin of neo, color format + frequency 
void setup() {
  ring.begin();
  ring.show();
  ring.setBrightness(255);
}

/*
There are a couple different ways to set the color of a pixel. The first is:
ring.setPixelColor(n, red, green, blue);
or, if you're using RGBW strips:
ring.setPixelColor(n, red, green, blue, white);
*/

void loop() {
  for(int i = 0; i <= ring.numPixels(); i++) {
    ring.setPixelColor(i, 255, 255, 255, 255);
    ring.setPixelColor(i-1, 0, 0, 0, 0);
    ring.show();
    delay(200);
  }
}


/*
void loop() {
  uint32_t c = 0xFFFFFF;
  for(int i = 0; i < ring.numPixels(); i++) {
    ring.setPixelColor(i, 255, 255, 255, 255);
    ring.show();
    delay(50);
  }
  c = 0x000000;
  for(int i = 0; i < ring.numPixels(); i++) {
    ring.setPixelColor(i, 0, 0, 0, 0);
    ring.show();
    delay(50);
  }
}
*/

/*
void loop() {
  for(uint32_t c = 0xFFFFFF; c; c >>= 8) { // Red, green, blue
    for(int i = 0; i < ring.numPixels(); i++) {
      ring.setPixelColor(i, c);
      ring.show();
      delay(50);
    }
  }
  for(uint32_t c = 0x000000; c; c >>= 8) { // Red, green, blue
    for(int i = 0; i < ring.numPixels(); i++) {
      ring.setPixelColor(i, c);
      ring.show();
      delay(50);
    }
  }
}
*/

/*
void loop() {
  for(int i = 0; i < ring.numPixels(); i++){
    ring.setPixelColor(i, 255, 255, 255, 1);
    ring.show();
    delay(50);
  }
  for(int i = 0; i < ring.numPixels(); i++){
    ring.setPixelColor(i, 0, 0, 0, 0);
    ring.show();
    delay(50);
  }
}
*/