I connect it like this:

And I add this program:
Code: Select all
#include <FastLED.h>
#define NUM_LEDS 20
#define DATA_PIN 2
CRGB leds[NUM_LEDS];
void setup()
{
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.setBrightness(128);
}
void loop()
{
for(int i = 0; i <140; i++)
{
leds[i] = CRGB::Blue;
FastLED.show();
delay(50);
}
delay(50);
for(int i = 0; i <140; i++)
{
leds[i] = CRGB::Black;
FastLED.show();
delay(50);
}
}I tried with two different ESP32 with same result.
What could be the cause?