#include "FastLED.h"
#include <avr/power.h>

#define  NUM_PIXEL 16
#define  DATAPIN 0

CRGB leds[NUM_PIXEL];

void setup() { 
  clock_prescale_set(clock_div_1);
  
  FastLED.addLeds<NEOPIXEL, DATAPIN>(leds, NUM_PIXEL);
}

void loop() { 
  static uint8_t hue = 0;
  static uint8_t offset = 0;
  static uint8_t increment = 1; 
  offset = offset + increment;
  leds[offset % NUM_PIXEL] = CHSV(hue++, 255, 255);
  FastLED.show(); 

  if(offset % NUM_PIXEL == 0) {
    increment *= -1;
  }
  delay(20);

}
ATTINY8520PU