#include <FastLED.h>

#define NUM_LEDS 16
CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2812B, 3, GRB>(leds, NUM_LEDS);
}

void loop() {
  static uint8_t chase_pos = 0;
  static uint8_t chase_fade_in = 0;
  CRGB chase_colour = CRGB::Aquamarine;

  // fade all LEDs towards black
  fadeToBlackBy(leds, NUM_LEDS, 1);

  // increase the fade in brightness, capping at 255
  chase_fade_in = qadd8(chase_fade_in, 5);

  // set the current pos to the chase colour
  leds[chase_pos] = chase_colour;
  // and dim it to the fade in level
  fadeToBlackBy(&leds[chase_pos], 1, 255 - chase_fade_in);

  // if fully faded in, start fading in the next LED
  if (chase_fade_in == 255) {
    chase_fade_in = 0;
    chase_pos = (chase_pos + 1) % NUM_LEDS;
  }

  FastLED.show();
  // delay(10);
}