Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastLED based output #134

Draft
wants to merge 14 commits into
base: mdev
Choose a base branch
from
Draft

FastLED based output #134

wants to merge 14 commits into from

Conversation

netmindz
Copy link
Collaborator

@netmindz netmindz commented May 26, 2024

Add the LED output option via FastLED rather than NeoPixelBus to compare how it performs, especially if it is lest prone to flicker/glitches

@netmindz
Copy link
Collaborator Author

Ouput working, but config not saving properly so you need to re-enter the values. Had all sorts of fun with this during the Hub75 driver, need to remind myself how to fix

@netmindz netmindz changed the title FastLED FastLED based output May 27, 2024
@netmindz netmindz requested a review from troyhacks May 27, 2024 13:49
@@ -1,6 +1,8 @@
#ifndef BusManager_h
#define BusManager_h

#include <FastLED.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that adding a few define's before #include <FastLED.h> is enough to select the fastLed "clockless I2S" instead of "clockless RMT" driver

#define FASTLED_ESP32_I2S true               // use clockless I2S driver instead of RMT
#define I2S_DEVICE 1                         // I2S#0 needed by audioreactive
#define FASTLED_ESP32_I2S_NUM_DMA_BUFFERS 4  // recommended for solving flicker issues in combination with interrupts triggered by other code parts.
#undef FASTLED_INTERNAL // just to be sure

##include <FastLED.h>

The I2S implementation can drive up to 24 strips in parallel, so it might be an interesting option.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah might be interesting to try as well. I think that driver is possibly older code from the same guy

netmindz and others added 7 commits May 29, 2024 17:51
* added getPixelColor()
* adjusted IS_DIGITAL macro
* disabled FastLED color correction (already done by WLED)
* added support for RGB color order (change "#if 1" to "#if 0" to activate)
* added sanity checks for pixels out of range
* made brightness limiter happy
to solve a collision with with FX.h
which includes both  fastled.h and busmanager.h.
FastLED stores pixels without brightness reduction, so we need to skip restoreColorLossy() when using fastLED drivers.
@softhack007
Copy link
Collaborator

softhack007 commented Jun 6, 2024

Lessons learned today: FastLED clockless RMT is not compatible with NeoPixelBus - You can either have LEDs driven by one or the other, but you cannot use both drivers at the same time. If you try, WLED will freeze, and then freeze will happen again after each reboot.

It looks like NeoPixelBus stalls waiting for RMT Interrupts - even on RMT units that are not assigned to NPB.

leds[] are "full brightness", so ABL was freakin' out about high current.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants