FastLED library and Qwiic LED Stick (SPX-14783) compatibility

Hi. This is a Newby QWIIC question. I believe the answer is no but is there a way to get the FastLED library to work with I2C devices like the LED Stick? I know that FastLED is compatible with the APA102 LED but I can’t seem to get it working with the LED stick above. I am using a Sparkfun RedBoard (Uno). Thanks in advance, Joe

Yes, but you’ll have to become familiar with editing code to do so - please share the code(s) you are trying to use with pictures of how you have it wired/setup, and might be able to point you in a direction to proceed

The programming part is fine with me. Maybe this is the wrong forum but I was trying to understand if anyone has used FastLED with the QWIIC interface or how much effort it is to get it to work with I2C. The FastLED documentation lists SPI but also Clock and Data interfaces. My setup is simply an Sparkfun Redboard QWIIC connected to the corresponding QWIIC of the LED stick. It works fine with the Qwiic LED Stick examples and library. I wanted the added functionality of FastLED so I was hoping to get it to work. I don’t see how you would add an I2C address for instance so I’m a bit suspect but thought I would ask here before I dug into it or bought a different LED board with the native LED interfaces exposed. My code (below) is just the Blink sample and it compiles and loads correctly.

#include <FastLED.h>

#define NUM_LEDS 10 // Qwiic LED Stick

#define DATA_PIN 18 // SDA Pin on UNO

#define CLOCK_PIN 19 // SCL Pin on UNO

CRGB leds[NUM_LEDS];

void setup()

{

FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);

}

void loop()

{

// Turn the LED on, then pause

leds[0] = CRGB::Red;

FastLED.show();

delay(500);

// Now turn the LED off, then pause

leds[0] = CRGB::Black;

FastLED.show();

delay(500);

}

Unfortunately FastLED is not compatible with the Qwiic LED stick since the stick doesn’t accept data using the APA102 protocol. (Although it does generate APA102 commands on the board.) The only way to drive these LEDs is to use our [Arduino library.

If you want a stick that can be driven with FastLED, try the [Lumenati 8-stick, it has bare APA102 LEDs on it and should work fine with that library.](SparkFun Lumenati 8-stick - COM-14359 - SparkFun Electronics)](GitHub - sparkfun/SparkFun_Qwiic_LED_Stick_Arduino_Library: This is an Arduino library for the Qwiic LED Stick to control 10 addressable LEDs with I2C)

Got it. Thanks!