Hello,
I am trying to light up a pair of 144 LED strips(sk6812 rgbw) from an Arduino nano (old bootloader) using the NeoPixelBus library.
When my LED related code is in the Setup() method the led strip lights up as expected, no random LEDs turning random colours:
#include <NeoPixelBus.h>
#define DataPin 4
#define NumLeds 144
NeoPixelBus<NeoRgbwFeature, Neo800KbpsMethod> strip(NumLeds , DataPin );
RgbwColor red(0,255,0,0);
RgbwColor off(0,0,0,0);
void setup() {
//single led blink
strip.Begin();
strip.SetPixelColor(50,red);
strip.Show();
delay(1000);
strip.SetPixelColor(50,off);
strip.Show();
}
void loop()
{
}
^ Appears to Work!
However, I try to execute LED related code in the for loop, then I get mostly random LEDs lighting up and sometimes the expected behavior occurs:
#include <NeoPixelBus.h>
#define DataPin 4
#define NumLeds 144
NeoPixelBus<NeoRgbwFeature, Neo800KbpsMethod> strip(NumLeds , DataPin );
RgbwColor red(0,255,0,0);
RgbwColor off(0,0,0,0);
void setup() {
strip.Begin();
}
void loop()
{
//looping led blink
strip.SetPixelColor(i,red);
strip.Show();
delay(1000);
strip.SetPixelColor(50,off);
strip.Show();
}
^ Doesnt work as expected
I’m not sure whats going on or how to debug this further. I think maybe it could be hardware related (using rgbw instead of rgb LEDs). I tried with the FastLED library and followed the rgbw hack HERE… but i still ran into the same issue.
Thanks for your time, and sorry if something doesn’t make sense.