// 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
// #define FASTLED_RMT_MAX_CHANNELS 1
// #define FASTLED_RMT_SERIAL_DEBUG 1

#define FASTLED_RMT_BUILTIN_DRIVER 1
#include <FastLED.h>

#define NUM_LEDS 25

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;
  for (uint8_t i = 0; i < NUM_LEDS; i++) {
    leds[i] = ColorFromPalette(RainbowStripeColors_p, (i + offset), 255);
  }
  FastLED.show();
  offset++;
  delay(10);
}