Has anyone out there used FastLED to drive APA102s from an ESP32?

Has anyone out there used FastLED to drive APA102s from an ESP32? I have only worked on clockless strips (like the WS281x), but someone is reporting that clocked chips don’t work. I don’t have any APAs, so I’m hoping someone else can check it out.

I’m currently using 296 SK9822s in my ESP32 powered hat, using your fork of the library. They are almost identical to APA102Cs and a lot of the chinese vendors sell them as APA102Cs. Not all pins work. I’m currently using:

#define DATA_PIN_0 4
#define CLK_PIN_0 5
#define DATA_PIN_1 25
#define CLK_PIN_1 26
#define DATA_PIN_2 16
#define CLK_PIN_2 17
#define DATA_PIN_3 18
#define CLK_PIN_3 19

#define LED_TYPE SK9822
#define COLOR_ORDER BGR
#define NUM_LEDS_PER_STRIP 74
#define NUM_STRIPS 4
#define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS

FastLED.addLeds<LED_TYPE, DATA_PIN_0, CLK_PIN_0, COLOR_ORDER, DATA_RATE_MHZ(12)>(leds, 0, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
FastLED.addLeds<LED_TYPE, DATA_PIN_1, CLK_PIN_1, COLOR_ORDER, DATA_RATE_MHZ(12)>(leds, NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
FastLED.addLeds<LED_TYPE, DATA_PIN_2, CLK_PIN_2, COLOR_ORDER, DATA_RATE_MHZ(12)>(leds, 2 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);
FastLED.addLeds<LED_TYPE, DATA_PIN_3, CLK_PIN_3, COLOR_ORDER, DATA_RATE_MHZ(12)>(leds, 3 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip);

@Sam_Guyer , thanks again for all of your hard work on your ESP32 fork :slight_smile:

@Jeremy_Spencer It looks like you are setting the data rate explicitly – that might be the issue for the person having a problem. Thanks!

@Sam_Guyer That’s why I included all the relevant lines of code :wink:

@Jeremy_Spencer Fantastic! Thanks