I have it wired up as recommended with capacitor and 470ohm resistor:
I thought I had destroyed it, by briefly getting the power wires mixed up, because I couldn't get anything out of it from test programs in either Neopixel or FastLED.
But then this morning when I woke up it was doing a rather long sequence of things using the first 30 leds. Obviously capable of making light. I do not understand where that sequence came from. Is there demo code in the LED chips themselves? I've checked all my wiring, and nothing is flickering if I wiggle any of it.
So I uploaded the FastLED test code below, and it went to a single blue LED #0. Then I uploaded the Neopixel code below. Still one blue LED. It seems completely unresponsive now. But not completely dark like it was yesterday!
Here's the fastLED test code:
#include <FastLED.h>
#define NUM_LEDS 18
#define LED_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(50);
}
void loop() {
leds[0] = CRGB::Red;
leds[1] = CRGB::Green;
leds[2] = CRGB::Blue;
FastLED.show();
}
after uploading (I'm not sure whether this code was already in the esp or not...) I got this trace:
09:16:24.178 -> EspIO: backend=UART0 (compile-time choice; #define FASTLED_ESP_FORCE_USB_SERIAL_JTAG to switch)
09:16:24.178 -> src/fl/channels/manager.cpp.hpp(38): ChannelManager: Initializing
09:16:24.178 -> src/fl/channels/manager.cpp.hpp(171): ChannelManager: Added driver 'RMT' (priority 2, caps: CLOCKLESS)
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt_memory_manager.cpp.hpp(49): RMT Memory (ESP32-S3): TX=192 words, RX=192 words (DEDICATED pools)
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(685): WARN: [RMT5_ENCODER] Timing config: resolution=40000000Hz, ns_per_tick=25
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(687): WARN: [RMT5_ENCODER] Bit0: high=10 ticks, low=40 ticks
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(688): WARN: [RMT5_ENCODER] Bit1: high=35 ticks, low=15 ticks
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(689): WARN: [RMT5_ENCODER] Reset: 11200 ticks
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(722): WARN: [RMT5_ENCODER] Encoder created successfully
09:16:24.275 -> E (5416) cache: esp_cache_msync(113): invalid addr or null pointer
09:16:24.275 -> src/platforms/esp/32/drivers/rmt/rmt_5/rmt5_peripheral_esp.cpp.hpp(464): RMT5_PERIPH: Cache sync disabled due to ESP_ERR_INVALID_ARG. Memory barriers will ensure ordering.
I searched on it, and it said it was not fatal, but I didn't do much more before trying the Neopixel code:
/*
* 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-ws2812b-led-strip
*/
#include <Adafruit_NeoPixel.h>
#define PIN_WS2812B 6 // The ESP32 pin GPIO16 connected to WS2812B
#define NUM_PIXELS 30 // The number of LEDs (pixels) on WS2812B LED strip
Adafruit_NeoPixel ws2812b(NUM_PIXELS, PIN_WS2812B, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
while (!Serial) {
delay(100);
}
delay(5000);
ws2812b.begin(); // initialize WS2812B strip object (REQUIRED)
}
void loop() {
ws2812b.clear(); // set all pixel colors to 'off'. It only takes effect if pixels.show() is called
// turn pixels to green one-by-one with delay between each pixel
for (int pixel = 0; pixel < NUM_PIXELS; pixel++) { // for each pixel
ws2812b.setPixelColor(pixel, ws2812b.Color(0, 255, 0)); // it only takes effect if pixels.show() is called
ws2812b.show(); // update to the WS2812B Led Strip
delay(500); // 500ms pause between each pixel
}
// turn off all pixels for two seconds
ws2812b.clear();
ws2812b.show(); // update to the WS2812B Led Strip
delay(2000); // 2 seconds off time
// turn on all pixels to red at the same time for two seconds
for (int pixel = 0; pixel < NUM_PIXELS; pixel++) { // for each pixel
ws2812b.setPixelColor(pixel, ws2812b.Color(255, 0, 0)); // it only takes effect if pixels.show() is called
}
ws2812b.show(); // update to the WS2812B Led Strip
delay(1000); // 1 second on time
Serial.println("cycling");
// turn off all pixels for one seconds
ws2812b.clear();
ws2812b.show(); // update to the WS2812B Led Strip
delay(1000); // 1 second off time
}
I tried cutting power for 30 seconds, still the same single blue LED. Cut power for half an hour, and now it's completely dark again. The neopixel routine is running....
I am very confused. Any troubleshooting tips welcomed.
Thanks!
-eric


