#include <FastLED.h>

#define LED_PIN     2
#define NUM_LEDS    256

CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setMaxPowerInVoltsAndMilliamps(5,2500); 
}

void loop() {
  for (int i = 0; i <= NUM_LEDS; i++) {
    leds[i] = CRGB(0, 0, 100);
    FastLED.show();
    delay(1);
  }
  for (int i = NUM_LEDS; i >= 0; i--) {
    leds[i] = CRGB(100, 0, 0);
    FastLED.show();
    delay(1);
  }
}