Help with chasing LEDS

So i’m trying to make a chasing white LED pattern over blue LEDS. I would like the chasing white LEDS to be in a striped pattern so that the colors alternate white, blue, white, blue, etc. and so that they have the appearance of movement.

However, I can’t seem to figure out how to get more than one block of white LEDS moving down the blue LEDS. I’ve tried copying the white LED code and making it so that the new LED blip is ahead of the first blip, but that doesn’t work. I think this may just be a problem of me not knowing how to use arduino effectively, but can anyone give me some advice.

blueShooter2.ino (784 Bytes)

Try:

#include <FastLED.h>

#define NUM_LEDS 15
#define LED_PIN 2

CRGB led[NUM_LEDS];

//***********************************************************************
void setup()
{
  LEDS.setBrightness(75);
  FastLED.addLeds<NEOPIXEL, LED_PIN>(led, NUM_LEDS);

  for (int i = 0; i < NUM_LEDS; i++)
  {
    led[i] = CRGB(0, 0, 255);
  }
  
} //END of setup()

//***********************************************************************
void loop()
{
  for (int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 2)
  {
    led[whiteLed] = CRGB::White;
    led[whiteLed + 1] = CRGB::Blue;
  }
  
  FastLED.show();
  delay(200);

  for (int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 2)
  {
    led[whiteLed] = CRGB::Blue;
    led[whiteLed + 1] = CRGB::White;
  }

  FastLED.show();
  delay(200);

} //END of loop()

//***********************************************************************