🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Stack Atom Echo LED control with M5Unified and FastLED

    General
    1
    1
    29
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      voxen
      last edited by

      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();
      }
      ...
      
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post