Led band Bicolor/tricolor chase

Hi everyone,

I am new to the ARDUINO community.
I code regularly in VBS :zipper_mouth_face: , but not in C ++, but I can manage.

I made a led strip with different effects depending on input.
However, I am blocking on a very important effect (the main one !!!)

I would like this effect, but in two colors, (example : 6px green, 6px blue, 2px black, reboot)
both colors will be determined according to input on arduino.
example input 1 Red
input 2 Green
input 3 Blue

if 2 enters this effect in bicolor:

My first effects are in FASTLED, I tested with Adafruit NeoPixel and with WS2812fx without succeeding.

Can you help me?
Thank you. :wink:

Not really, there is not enough information. A schematic, not a frizzy thing and your code would be a good start.

this is the same schema, but it's pin 3

this is my code (no button), i'm trying to add a color or increase the number 3 for have 5px or 6 ... but it doesn't work.

#include "FastLED.h"
#define NUM_LEDS 191
#define PIN 3

void setup()
  FastLED.addLeds<WS2812B, PIN, GRB>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );

void loop() {

void theaterChase(byte red, byte green, byte blue, int SpeedDelay) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (int i=0; i < NUM_LEDS; i=i+3) {
        setPixel(i+q, red, green, blue);    //turn every third pixel on
//      for (int i=0; i < NUM_LEDS; i=i+4) {
//        setPixel(i+q, 0,0,0xff);        //turn every third pixel off
//      }                                 // I try to add this but 'its no fonctionnal.
      for (int i=0; i < NUM_LEDS; i=i+3) {
        setPixel(i+q, 0,0,0);        //turn every third pixel off

void setPixel(int Pixel, byte red, byte green, byte blue) {
   // NeoPixel
   strip.setPixelColor(Pixel, strip.Color(red, green, blue));
   // FastLED
   leds[Pixel].r = red;
   leds[Pixel].g = green;
   leds[Pixel].b = blue;

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.