#include <Adafruit_NeoPixel.h>

int pin = 12;
int N_LEDS = 40;

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, 0, 0));
      ring.show();
      delay(500);
      if (i < 10) {
        ring.setPixelColor(i, ring.Color(0, 188, 126));
        ring.show();
        delay(500);
      }

      else if (i >= 10 and i < 20) {
        ring.setPixelColor(i, ring.Color(238, 0, 50));
        ring.show();
        delay(500);
      }

      else if (i >= 20 and i < 30) {
        ring.setPixelColor(i, ring.Color(126, 34, 225));
        ring.show();
        delay(500);
      }

      else {
        ring.setPixelColor(i, ring.Color(92, 0, 0));
        ring.show();
        delay(500);
      }

  }

}