// ESP32-S2 ARGB Test
#include <Adafruit_NeoPixel.h>
#define NUMPIXELS 1
#define LED_PIN 18
Adafruit_NeoPixel pixels(NUMPIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
pixels.begin();
pixels.setBrightness(255);
}
void loop() {
Serial.println("Red");
pixels.fill(0xff0000); //(255,0,0)
pixels.show();
delay(1000);
Serial.println("Green");
pixels.fill(0x00ff00); //(0,255,0)
pixels.show();
delay(1000);
Serial.println("Blue");
// pixels.fill(0x0000ff); // (0,0,255) Bug?
pixels.fill(0x0000cf); // (0,0,207)
pixels.show();
delay(1000);
Serial.println("White");
pixels.fill(0xffffff); //(255,255,255)
pixels.show();
delay(1000);
Serial.println("Black");
pixels.fill(0x000000); //(0,0,0)
pixels.show();
delay(1000);
}
Loading
esp32-s2-devkitm-1
esp32-s2-devkitm-1