#include <Adafruit_NeoPixel.h>
#define PIN 2        // Neopixel Ring : input pin
#define NUMPIXELS 1 // Neopixel Ring : number of leds

Adafruit_NeoPixel NeoPixel = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(115200);
  // Initialize the NeoPixel library.
  NeoPixel.begin();
}

void setRingColor(int color1, int color2, int color3){
  for (int i=0; i < NUMPIXELS; i++) {
      NeoPixel.setPixelColor(i, NeoPixel.Color(color1, color2, color3));
    }
  NeoPixel.show();
}


void loop() {
  // Read the result:
  delay(1000);
  setRingColor(255,0,0); // ROSSO
  delay(1000);
  setRingColor(255,140,0); // ARANCIONE
  delay(1000);
  setRingColor(255,255,0); // GIALLO
  delay(1000);
  setRingColor(0,255,0); // VERDE
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT