#include <Adafruit_NeoPixel.h>
int Pin = 12;
int N_LEDS = 16;
Adafruit_NeoPixel ring = Adafruit_NeoPixel(N_LEDS, Pin);
void setup() {
// put your setup code here, to run once:
ring.begin();
}
void loop() {
// put your main code here, to run repeatedly:
for(int i = 0; i < N_LEDS; i++) {
ring.setPixelColor(i, ring.Color(0, 255, 0));
ring.show();
delay(500);
if (i < 8) {
ring.setPixelColor(i, ring.Color(255, 0, 0));
ring.show();
delay(500);
}
else{
ring.setPixelColor(i, ring.Color(0, 255, 0));
ring.show();
delay(500);
}
}
}