#include <FastLED.h>
#define NUM_LEDS 40
#define DATA_PIN 6
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
#define BRIGHTNESS 255
#define VOLTS 5
#define MAX_AMPS 500 // milliamps

CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<CHIPSET, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
  FastLED.setMaxPowerInVoltsAndMilliamps(VOLTS, MAX_AMPS);
  FastLED.setBrightness(BRIGHTNESS);
  FastLED.clear();
  FastLED.show();
}

void loop() {
  fadeToBlackBy(leds, NUM_LEDS, 2);      // Smaller value = longer tail
  int i = (millis() / 80) % NUM_LEDS;    // How fast it goes.
  leds[i] = CRGB::White;
  leds[i - 1] = CRGB(4, 191, 248);
  FastLED.show();
}