Bad code, something isnt quite right
Hi guys
I have a whole load of LED’s set up. I have 14x2.5m strips of APA102c connected to a Teensy 3.2+prop shield. Power output is all fine too.
When i run some animations, such as the Rainbow example, or some simple ones, there is no problem whatsoever. However, when I run a really simple one to do a white strip, and nothing else, the strip seems to become corrupted in places, and also the white becomes quite yellow-y.
any thoughts as to why this would happen?
My code is below
#include “FastLED.h”
#define NumPixels 150
#define Datapin 11
#define Clockpin 13
#define DataRate_Mhz 12
CRGB leds[NumPixels];
int r = 255, g = 255, b = 25;
void setup()
{
FastLED.addLeds<APA102,Datapin,Clockpin,BGR,DATA_RATE_MHZ(DataRate_Mhz)>(leds,NumPixels).setCorrection(CRGB( 255, 160, 240));
fill_solid(leds, NumPixels, CRGB(0,0,0)); // fill all to empty
FastLED.show();
pinMode(7, OUTPUT); // using the prop shield this is required
digitalWrite(7, HIGH); // using the prop shield this is required
delay(2000);
}
void loop()
{
fill_solid(leds, NumPixels, CRGB(r,g,b)); // fill all to colour
FastLED.show();
delay(5000);
}