M5Stack Atom Echo LED control with M5Unified and FastLED
-
Hi everyone,
I have an M5Stack Atom Echo development kit that I’d like to program using the Arduino platform. According to the official recommendation, I’d like to use the M5Unified library.My problem is that I can’t control the LED at all with the M5Unified + FastLED combination - it just stays lit in white. The exact same example code works perfectly with FastLED + the old M5Stack library, but as soon as I switch it to M5Unified, it doesn’t work.
Does anyone have an idea how to make it work?Not working code:
#include <M5Unified.h> #include <FastLED.h> #define NUM_LEDS 1 #define DATA_PIN 27 CRGB leds[NUM_LEDS]; void setup() { auto cfg = M5.config(); M5.begin(cfg); FastLED.addLeds<SK6812, DATA_PIN, GRB>(leds, NUM_LEDS); FastLED.clear(); FastLED.show(); } ...
Working code with the old, deprecated lib:
#include <M5Atom.h> #include <FastLED.h> #define NUM_LEDS 1 #define DATA_PIN 27 CRGB leds[NUM_LEDS]; void setup() { M5.begin(true, false, true); FastLED.addLeds<SK6812, DATA_PIN, GRB>(leds, NUM_LEDS); FastLED.clear(); FastLED.show(); } ...