// To have the sketch work correctly, but more slowly add
// "__timingOptimizations": "disable"
// to the "attrs" of your ESP32 part

// #define FASTLED_ALLOW_INTERRUPTS 1
// #define INTERRUPT_THRESHOLD 255
// #define FASTLED_ESP32_I2S
#include <FastLED.h>

#define NUM_LEDS 16

CRGB leds[NUM_LEDS];

void setup() {
  Serial.begin(9600);
  FastLED.addLeds<WS2812B, 5, GRB>(leds, NUM_LEDS);
  Serial.println("OK");
}

void loop() {
  static uint8_t offset = 0;
  Serial.println(offset);
  for (uint8_t i = 0; i < NUM_LEDS; i++) {
    leds[i] = ColorFromPalette(RainbowStripeColors_p, (i + offset), 255);
  }
  FastLED.show();
  offset++;
  Serial.println(offset);
  Serial.println(offset);
  Serial.println(offset);
  Serial.println(offset);
}