Hi,
I'm new to this forum so please excuse any mistakes I possibly made.
I have an LED Strip (WS2812B) attached to an Arduino Nano and my plan is to divide the LED's into groups.
I want every group to show different lighting effects, so for example one group should include a rainbow effect and one group should constantly flicker and so on.
I'm currently struggling with these groups, I have defined 5 arrays of LED's but I don't know how to display effects to the groups.
For example I came up with a first idea of a code for the rainbow effect and now I want to show this effect on LED 1, 2, 3, 4, 5, 20, 21, 22 and 23.
#include "FastLED.h"
#define PIN 6
#define NUM_LEDS 40
#define BRIGHTNESS 50
CRGBArray<NUM_LEDS> leds;
uint8_t hue[NUM_LEDS];
void setup()
{
 FastLED.addLeds<NEOPIXEL, PIN>(leds, NUM_LEDS);
 FastLED.setBrightness(BRIGHTNESS);
 for (int i = 0; i < NUM_LEDS; i++)
 {
  hue[i] = 255 / NUM_LEDS * i;
 }
}
void loop()
{
 for (int i = 0; i < NUM_LEDS; i++)
 {
  leds[i] = CHSV(hue[i]++, 255, 255);
 }
 FastLED.show();
 delay(30);
}
Can anybody explain to my, how these groups work and how I could display effects to one special Array of LED's?
I'd really appreciate your help!!
rgb_wave.ino (478 Bytes)