M5Atom Matrix, M5Unfied, controlling leds
-
Hi am stumped,
I just can't control the leds anymore.
This is my code, no led goes on.
Any suggestion where I am going terrible wrong?#include <arduino.h> #include <M5Unified.h> #include <FastLED.h> #define NUM_LEDS 25 #define DATA_PIN 27 #define CLOCK_PIN 13 CRGB leds[NUM_LEDS]; void setup() { auto cfg = M5.config(); cfg.serial_baudrate = 115200; cfg.output_power = true; M5.begin(cfg); //FastLED.addLeds<WS2812, DATA_PIN,GRB>(leds, NUM_LEDS); // GRB ordering is assumed FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); for (int i=0;i<NUM_LEDS;i++) {leds[i]=CRGB::Red;};FastLED.show(); } -
Hello @HappyUser
M5Unified has built-in LED support. My guess is that the two, M5Unified and FastLED, are 'fighting' for the LED. Have a look here. There is an example at the end of the page.
Thanks
Felix -
@felmue thanks. Indeed. Leaving out m5unified does the trick. Though I haven’t read anything about an incompatibility between M5Unified and FastLed. Regards.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login