@AustinSmith
Unfortunately, no matter how I tried to disable it using M5Unified, I could not get it to work. In the end, adding the line suggested above finally solved the issue.
pinMode(DATA_PIN, OUTPUT); // <- Add this
@AustinSmith
Unfortunately, no matter how I tried to disable it using M5Unified, I could not get it to work. In the end, adding the line suggested above finally solved the issue.
pinMode(DATA_PIN, OUTPUT); // <- Add this
Thank you for the advice.
@sei
It really was just this one thing that was missing, and now it works.
Thank you very much. :)
I have already read through several forums and tried multiple AI tools, but I could not find the solution in any of them. With this, however, it truly works. I do not understand why these things are not properly documented somewhere.
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();
}
...