// This uses Yves' driver https://github.com/hpwit/I2SClocklessLedDriver
// FastLED now supports this natively, but I have not worked with or tested it.
// This _should_ work, but Yves docs are sometimes a bit confusing.
#define NUM_STRIPS 1
#define NUM_LEDS_PER_STRIP 1
#include "I2SClocklessLedDriver.h"
#include <FastLED.h>
I2SClocklessLedDriver driver;
// How many leds in your strip?
uint8_t leds[3*NUM_STRIPS*NUM_LEDS_PER_STRIP]; //equivalent of CRGB leds[NUM_LEDS_PER_STRIPS*NUM_LEDS_PER_STRIPS]
int pins[NUM_STRIPS]={5};
void setup() {
driver.initled((uint8_t*)leds,pins,NUM_STRIPS,NUM_LEDS_PER_STRIP,ORDER_GRB);
driver.setBrightness(255);
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
driver.showPixels();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
driver.showPixels();
delay(500);
}