Hey guys, I´m struggling a bit with the following project:
I have created 5 RGB panels out of wood and I attached an LED strip to the panels. I will definitely add a scheme of how this looks, because it´s a bit hard to explain. (please excuse my bad painting skills, I hope you can understand how it´s built :D)
Each panel contains multiple parts of the LED strip as it runs at least two times through every panel.
My plan was to let every panel have it´s own rainbow cycle but with a small delay which is different from panel to panel (so that the cycle will always be in a different status than the cycle of the panel next to it).
My current problem is the color cycle effect. I have tried to use the Adafruit default RGB cycle effect(I think this is the coolest) but I dont know how to run it on every single array I created(to devide the strip into the panels, but maybe this isn
t the best solution either, I`d appreciate other ideas as well).
#include "FastLED.h"
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
#define NUM_LEDS 40
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
Adafruit_NeoPixel strip(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
byte array1[] = { 0, 1, 2, 3, 36, 37, 38, 39 };
byte array2[] = { 4, 5, 6, 7, 8, 33, 34, 35 };
byte array3[] = { 9, 10, 11, 12, 29, 30, 31, 32 };
byte array4[] = {13, 14, 23, 24, 25, 26, 27, 28 };
byte array5[] = {15, 16, 17, 18, 19, 20, 21, 22 };
void setup()
{
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
strip.begin();
strip.show();
strip.setBrightness(50);
}
void loop()
{
for (int i = 0; i < 9; i++)
{
for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256)
{
for(int i=0; i < 9; i++)
{
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
}
}
delay(60);
for (int i = 0; i < 9; i++)
{
}
delay(60);
for (int i = 0; i < 9; i++)
{
}
delay(60);
for (int i = 0; i < 9; i++)
{
}
delay(60);
for (int i = 0; i < 9; i++)
{
}
FastLED.show();
delay(60);
}
I hope you can understand the problem and help me with it.
If anything isn`t clear to you, I will add more Information.