Hey
so i have been building a lamp for a friends birthday which contains 231 pingpong balls with leds(ws2812b). together they form a matrix of 11x21 pixels. i am pretty new to all of this, meaning i am no electronics or porgramming expert and i have an issue i cant resolve by myself, so i came here in hope you guyes can help me.
the lamp works fine if i am using only the primitive colors(red,green and blue) but as soon as i mix colors(more than one led per ball) the programm freaks out and i get some weird images on the matrix.
i am using two 5v/8amp power supplies.
since the program is working fine exept for mutli-colors i assume it is not the problem and the problem is found somwhere in the wiring or hardware. if wanted i could upload a short video on youtube which shows the problem more accurate.
#include <FastLED.h>
#define NUM_LEDS 231
#define DATA_PIN 13
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(200);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i ++) {
leds[i] = CRGB::Green;
FastLED.show();
delay(10);
}
for (int i = 0; i < NUM_LEDS; i ++) {
leds[231 - i] = CRGB::Red;
FastLED.show();
delay(10);
}
for (int i = 0; i < NUM_LEDS; i ++) {
leds[i] = CRGB::Blue;
FastLED.show();
delay(10);
}
for (int i = 0; i < 1000; i++) {
leds[random(0, 230)] = CRGB::Red;
FastLED.show();
delay(5);
}
leds[230] = CRGB::Red;
FastLED.show();
delay(20);
for (int i = 0; i < 115; i ++) {
leds[i] = CRGB::Black;
leds[231 - i] = CRGB::Black;
FastLED.show();
delay(10);
}
leds[115] = CRGB::Black;
leds[116] = CRGB::Black;
FastLED.show();
delay(10);
for (int i = 0; i < 115; i ++) {
leds[i] = CRGB::Black;
leds[231 - i] = CRGB::HotPink;
FastLED.show();
delay(10);
}
delay(1000);
}
i hope you can help me
thanks