I have a sketch using FastLED version 3.000.002 on Adafruit DotStar LED Strip - APA102 Warm White (Adafruit DotStar LED Strip - Addressable Warm White - 30 LED/m [~3000K] : ID 2435 : $99.75 : Adafruit Industries, Unique & fun DIY electronics and kits). The code I have just lowers and raises the brightness (turning off and on by fading). It works on my test strip of 14 leds, but when I move to a strip of 134 it is super slow and choppy. Here is the code I have that runs on the 14 led strip.
#include <FastLED.h>
#include <SPI.h>
#define NUM_LEDS 134
//First strained
#define DATA_PIN 5 // Green
#define CLOCK_PIN 6 // Blue
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN>(leds, NUM_LEDS);
Serial.begin(9600);
FastLED.show();
}
void loop() {
lightsOn();
Serial.println(“lights on”);
delay(2000);
lightsOff();
Serial.println(“lights off”);
delay(2000);
}
// function fading lights on
void lightsOn() {
int lightsOnMaxBrightness = 64;
int lightsOnMinBrightness = 2;
for (int i = lightsOnMinBrightness; i < lightsOnMaxBrightness; i++) {
lightsOnMinBrightness = i;
for ( int j = 0; j < NUM_LEDS; j++) {
leds[j] = CRGB(lightsOnMinBrightness);
FastLED.show();
}
}
}
void lightsOff() {
int lightsOffMaxBrightness = 64;
int lightsOffMinBrightness = 2;
for (int i = lightsOffMaxBrightness; i > lightsOffMinBrightness; i–) {
lightsOffMaxBrightness = i;
for ( int j = 0; j < NUM_LEDS; j++) {
leds[j] = CRGB(lightsOffMaxBrightness);
FastLED.show();
}
}
}
I appreciate any help!