#include <Adafruit_NeoPixel.h>

#define DIN_PIN 6
#define NUM_PIXELS 3

Adafruit_NeoPixel pixels(NUM_PIXELS, DIN_PIN);

int32_t colors[] = {
  pixels.Color(255, 0, 0), //rosso
  pixels.Color(255, 255, 0), //giallo
  pixels.Color(0, 255, 0),//verde
  
  
};

void setup() {
  pixels.begin();
  pixels.setBrightness(128);
  pixels.clear();
  pixels.show();
     for (int i= 0;i <5;i++){
  pixels.setPixelColor(1, colors[1]);
  pixels.show();
  delay(500);
  pixels.clear();
  pixels.show();
  delay(500);
  }
}

void loop() {
 
 pixels.setPixelColor(0, colors[2]);
  pixels.show();
  delay(5000);
  pixels.clear();
  pixels.show();
  for (int i= 0;i <5;i++){
  pixels.setPixelColor(0, colors[2]);
  pixels.show();
  delay(500);
  pixels.clear();
  pixels.show();
  delay(500);
 }
  pixels.setPixelColor(1, colors[1]);
  pixels.show();
  delay(5000);
  pixels.clear();
  pixels.show();
  for (int i= 0;i <2;i++){
  pixels.setPixelColor(1, colors[1]);
  pixels.show();
  delay(500);
  pixels.clear();
  pixels.show();
  delay(500);
  }
 
  pixels.setPixelColor(2, colors[0]);
  pixels.show();
  delay(5000);
  pixels.clear();
  pixels.show();
      
    }