/*
 * This ESP32 code is created by esp32io.com
 *
 * This ESP32 code is released in the public domain
 *
 * For more detail (instruction and wiring diagram), visit https://esp32io.com/tutorials/esp32-neopixel-led-strip
 */

#include <Adafruit_NeoPixel.h>

#define PIN_NEO_PIXEL 0  // The ESP32 pin GPIO16 connected to NeoPixel
#define NUM_PIXELS 7     // The number of LEDs (pixels) on NeoPixel LED strip

Adafruit_NeoPixel NeoPixel(NUM_PIXELS, PIN_NEO_PIXEL, NEO_GRB + NEO_KHZ800);

void setup() {
  NeoPixel.begin();  // initialize NeoPixel strip object (REQUIRED)
}

void loop() 
{

  NeoPixel.clear();  // set all pixel colors to 'off'. It only takes effect if pixels.show() is called

  for(int i=0;i<NUM_PIXELS;i++)
  {
    NeoPixel.setPixelColor(i, NeoPixel.Color(255,0,0));
    NeoPixel.show();
    delay(100);
     NeoPixel.clear();
  }
  for(int i=NUM_PIXELS;i>=0;i--)
  {
    NeoPixel.setPixelColor(i, NeoPixel.Color(255,0,0));
    NeoPixel.show();
    delay(100);
    NeoPixel.clear();

  }
  // turn off all pixels for one seconds
  NeoPixel.clear();
  NeoPixel.show();  // update to the NeoPixel Led Strip
  delay(500);      // 1 second off time
}
Loading
esp32-devkit-c-v4
rgb1:VDD
rgb1:DOUT
rgb1:VSS
rgb1:DIN
rgb2:VDD
rgb2:DOUT
rgb2:VSS
rgb2:DIN
rgb3:VDD
rgb3:DOUT
rgb3:VSS
rgb3:DIN
rgb4:VDD
rgb4:DOUT
rgb4:VSS
rgb4:DIN
rgb5:VDD
rgb5:DOUT
rgb5:VSS
rgb5:DIN
rgb6:VDD
rgb6:DOUT
rgb6:VSS
rgb6:DIN
rgb7:VDD
rgb7:DOUT
rgb7:VSS
rgb7:DIN