// Neopixel Interfacing
#include <Adafruit_NeoPixel.h>
// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS 1
#define PIN_NEOPIXEL 4
Adafruit_NeoPixel pix(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
pix.begin();
pix.setBrightness(200);
Serial.println("Hello, ESP32!");
}
void loop() {
pix.fill(0xFF0000);functionR(); //Red
pix.fill(0x00FF00);functionR(); //Green
pix.fill(0x0000FF);functionR(); //Blue
pix.fill(0x000000);functionR(); //white
pix.fill(0xFFC0CB);functionR(); //Pink
}
void functionR(){
pix.show();
delay(500);
}