M5Stamp LED Test Not Working Well
-
I’m working with an M5Stamp Fly drone running an ESP32-S3, trying to verify that my custom firmware properly controls the onboard WS2812 LED. I’ve written minimal FastLED code to blink the LED red and blue repeatedly. After flashing and erasing the flash completely, the LED blinks correctly for a short time, including across battery power cycles. However, after some minutes or power cycles, the LED stops responding and stays off, although the blue status LED remains on. This suggests the firmware runs initially but then stops updating the LED, possibly due to resets, watchdog triggers, or power instability. I could use some guidance on diagnosing why my minimal code works only briefly after flashing and then stops, and whether there are common pitfalls on the M5Stamp Fly or ESP32-S3 that could cause this intermittent behavior.
#include <FastLED.h> #define PIN_LED_ESP 21 CRGB leds[1]; void setup(){ FastLED.addLeds<WS2812, PIN_LED_ESP, GRB>(leds, 1); FastLED.setBrightness(50); } void loop(){ delay(3000); leds[0] = CRGB::Red; FastLED.show(); delay(500); leds[0] = CRGB::Blue; FastLED.show(); delay(500); }
-
Correction: The LED doesn't blink, it stays on continuously.