Skip to content

Commit 54bbaf1

Browse files
committed
Fix flickering for WS2812B
See FastLED/FastLED#849
1 parent 7ae1200 commit 54bbaf1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

FastLEDManager.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
#define NUM_LEDS 100
1010
#define LIGHTSTRIP_PIN 5
1111

12+
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB, int WAIT_TIME = 5>
13+
class WS2812Controller800Khz_noflicker : public ClocklessController<DATA_PIN, C_NS(250), C_NS(625), C_NS(375), RGB_ORDER, 0, false, WAIT_TIME> {};
14+
template<uint8_t DATA_PIN, EOrder RGB_ORDER>
15+
class WS2812B_noflicker : public WS2812Controller800Khz_noflicker<DATA_PIN, RGB_ORDER> {};
1216

1317
void setup()
1418
{
1519
initESPEssentials("Lightstrip");
1620

1721
FastLEDManager.initialize(NUM_LEDS);
18-
FastLEDManager.addLeds<WS2812B, LIGHTSTRIP_PIN, GRB>(FastLEDManager.hardwareLeds, NUM_LEDS);
22+
FastLEDManager.addLeds<WS2812B_noflicker, LIGHTSTRIP_PIN>(FastLEDManager.hardwareLeds, NUM_LEDS);
1923
FastLEDManager.registerAnimation(new Color("Color"));
2024
FastLEDManager.registerAnimation(new RbWave("RB Wave"));
2125
FastLEDManager.registerAnimation(new RgbWave("RGB Wave"));

0 commit comments

Comments
 (0)