// A suggestion from urish on Discord to improve FastLED/ESP32 results:
// To have the sketch work correctly, but more slowly add
// "__timingOptimizations": "disable"
// to the "attrs" of your ESP32 part

// I didn't see much difference with that.

// One way I've found to to get semi-reliable results with FastLED on ESP32 on Wokwi
// is to use v3.3.2 of FastLED (with `[email protected]` in libraries.txt)
// and force FastLED to use Espressif's RMT driver instead of FastLED's:
#define FASTLED_RMT_BUILTIN_DRIVER 1
#include <FastLED.h>

#define NUM_LEDS 64

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 * 4 + offset), 255);
  }
  FastLED.show();
  Serial.print('.');
  offset++;
  delay(20);
}