For some reason when I try the code with more than ~120 LEDs the Trinket becomes unstable. It continually resets and fails to run through the program once. I don't believe I'm up against the limit of the flash bytes. And I'm not actually pulling any more current (still just have the 39 LEDs). I decided to strip down the code to just "show a simple color" and it still locks up.
You can see how simple this version of the code is, and it still locks up on anything over ~120 but runs fine on anything less.
Code: Select all
#include <FastLED.h>
#define LED_PIN 1
#define NUM_LEDS 100 //201
#define BRIGHTNESS 20
#define LED_TYPE NEOPIXEL
#define COLOR_ORDER RGB
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 10
void setup() {
delay( 2000 ); // power-up safety delay
FastLED.addLeds<LED_TYPE, LED_PIN>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );
FastLED.BANNED(5,500);
SetValues();
FastLED.show();
}
void loop() {
// put your main code here, to run repeatedly:
//FastLED.delay(1000 / UPDATES_PER_SECOND);
}
void SetValues(){
for (int i=0; i < NUM_LEDS;i++){
leds[i] = CHSV(150, 255, 255);
}
}