// 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 pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
pixels.begin();
pixels.setBrightness(200);
Serial.println("Hello, ESP32!");
}
void loop() {
pixels.fill(0xFF0000);functionR(); //Red
pixels.fill(0x00FF00);functionR(); //Green
pixels.fill(0x0000FF);functionR(); //Blue
pixels.fill(0x000000);functionR(); //white
pixels.fill(0xFFC0CB);functionR(); //Pink
}
void functionR(){
pixels.show();
delay(500);
}