#define LED_PIN A0
#define LED_NUM 10
#include "FastLED.h"
CRGB leds[LED_NUM];
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, LED_NUM);
FastLED.setBrightness(50);
pinMode(A0, OUTPUT);
}
byte counter = 0;
int8_t dir = 1;
void loop() {
FastLED.clear();
leds[counter] = CRGB(255, 242, 0);
FastLED.show();
counter+=dir;
if ((counter == LED_NUM-1) || (counter == 0)) dir=-dir;
delay(200);
}