I'm working on a large LED project for a friend.
I have 1030 RGBW SK6812 (Similar WS2812B) Individually Addressable ( https://www.amazon.com/gp/product/B01N49DSC1 )
I'm running an ESP32 ( https://www.amazon.com/gp/product/B07Q576VWZ )
I have an 5V 80 Amp Mean Well power supply to run them, injecting power in several places.
I get 569 of the modules to light and there is some problems with I think data corruption or data timing as some of the leds are showing wrong color or brightness.
Any help is greatly appreciated.
This is my test code
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define LED_PIN 5
#define LED_COUNT 1030
// NeoPixel brightness, 0 (min) to 255 (max)
#define BRIGHTNESS 1
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRBW + NEO_KHZ800);
int bright_num = BRIGHTNESS;
int bright_change_pin = 23;
volatile int bright_change = 0;
volatile int change = 0;
void setup() {
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(bright_num); // Set BRIGHTNESS
pinMode(bright_change_pin,INPUT_PULLUP);// set pin for push button bright_change_pin
attachInterrupt(digitalPinToInterrupt(bright_change_pin), blink, CHANGE);
set();
bright_change = 0;
change = 0;
}
void loop() {
if(change == 1){
delay(500);
if(bright_change == 1){
if(bright_num < 250){
bright_num = bright_num + 50;
}else{
bright_num = 50;
}
if(bright_num == 250){
bright_num = 254;
}
strip.setBrightness(bright_num); // Set BRIGHTNESS to about 1/5 (max = 255)
strip.show(); // Update strip to match
bright_change = 0;
}
change = 0;
}
}
void set() {
int red_1 = 0;
int green_1 = 0;
int blue_1 = 0;
int white_1 = 255;
strip.fill(strip.Color(red_1, green_1, blue_1, white_1));
strip.setBrightness(bright_num); // Set BRIGHTNESS to about 1/5 (max = 255)
strip.show();
}
void blink() {
if(change == 0)
{
bright_change = 1;
change = 1;
}
}