// we ❤️ wokwi.com

#include <FastLED.h>

const int numLeds{
  /*w*/ 5 * 16 + 4 * 12 + 2 * 10 + 2 * 13 \
  /*o*/ + 64 + 56 \
  /*k*/ + 16 + 4 * 10  + 4 * 12 \
  /*w*/ + 2 * 22 + 6 * 20 \
  /*i*/ + 2 * 18 + 16};

CRGBArray<numLeds> leds;

const CRGBSet sets[] {
  // W
  leds(0, 12+16+12+1),    // up the LHS of left stroke of W, around ring1, back down RHS, 2 dots of ring2
  leds(56, 65),           // up the LHS shallow centre stroke
  leds(72, 77),           // up from join of LHS of the steep centre stroke
  leds(78, 93),           // around ring3
  leds(94, 105),          // down RHS of steep centre
  leds(106, 107),         // 2 dots around ring4
  leds(132, 144),         // up the LHS of right stroke
  leds(145, 160),         // around ring5
  leds(161, 173),         // down the RHS of right stroke
  leds(108, 121),         // remainder of ring4
  leds(66, 71),           // up to join of LHS of the steep centre stroke
  leds(122, 131),         // down RHS of shallow centre stroke
  leds(42, 55),           // around the remainder of ring2
  // o
  leds(174, 237),         // clockwise around outer ring
  leds(293, 238),         // anti-clockwise around inner ring
  // k
  leds(294, 296),         // 3 dots around ring
  leds(319, 310),         // up LHS of top vert
  leds(329, 320),         // down RHS of top vert
  leds(297, 299),         // 3 more dots of ring
  leds(341, 330),         // up LHS of top right
  leds(353, 342),         // down RHS of top right
  leds(300, 303),         // 4 more dots of ring
  leds(354, 365),         // down RHS of bottom right
  leds(366, 377),         // up LHS of bottom right
  leds(304, 307),         // 4 more dots of ring
  leds(387, 378),         // down RHS of bottom vert
  leds(397, 388),         // up LHS of bottom vert
  leds(308, 309),         // last 2 dots of ring
  // w
  leds(398, 561),
  // i
  leds(562, 613)
};


void setup() {
  FastLED.addLeds<NEOPIXEL, 2>(leds, 0, 174);    // w
  FastLED.addLeds<NEOPIXEL, 3>(leds, 174, 120);  // o
  FastLED.addLeds<NEOPIXEL, 4>(leds, 294, 104);  // k
  FastLED.addLeds<NEOPIXEL, 5>(leds, 398, 164);  // w
  FastLED.addLeds<NEOPIXEL, 6>(leds, 562, 52);   // i
}


void loop() {
  static uint16_t frame;
  frame += 1;

  uint16_t offset = -frame;
  uint8_t hue = frame;
  for (auto &set : sets) {
    for (auto &pixel: set) {
      if (offset++ % 32 == 0) {
        pixel = CHSV(hue, 255, 255);
        hue += 4;
      } else {
        pixel.fadeToBlackBy(8);
      }
    }
  }

  FastLED.show();
  delay(10);
}
w1s1:DOUT
w1s1:VDD
w1s1:VSS
w1s1:DIN
w1s2:DOUT
w1s2:VDD
w1s2:VSS
w1s2:DIN
w1s3:DOUT
w1s3:VDD
w1s3:VSS
w1s3:DIN
w1s6:DOUT
w1s6:VDD
w1s6:VSS
w1s6:DIN
w1s4:DOUT
w1s4:VDD
w1s4:VSS
w1s4:DIN
w1r1:GND
w1r1:VCC
w1r1:DIN
w1r1:DOUT
w1s5:DOUT
w1s5:VDD
w1s5:VSS
w1s5:DIN
w1r2:GND
w1r2:VCC
w1r2:DIN
w1r2:DOUT
w1r3:GND
w1r3:VCC
w1r3:DIN
w1r3:DOUT
w1r4:GND
w1r4:VCC
w1r4:DIN
w1r4:DOUT
w1s7:DOUT
w1s7:VDD
w1s7:VSS
w1s7:DIN
w1s8:DOUT
w1s8:VDD
w1s8:VSS
w1s8:DIN
w1r5:GND
w1r5:VCC
w1r5:DIN
w1r5:DOUT
or2:GND
or2:VCC
or2:DIN
or2:DOUT
or1:GND
or1:VCC
or1:DIN
or1:DOUT
ks1:DOUT
ks1:VDD
ks1:VSS
ks1:DIN
ks2:DOUT
ks2:VDD
ks2:VSS
ks2:DIN
ks3:DOUT
ks3:VDD
ks3:VSS
ks3:DIN
ks4:DOUT
ks4:VDD
ks4:VSS
ks4:DIN
ks5:DOUT
ks5:VDD
ks5:VSS
ks5:DIN
ks6:DOUT
ks6:VDD
ks6:VSS
ks6:DIN
ks7:DOUT
ks7:VDD
ks7:VSS
ks7:DIN
ks8:DOUT
ks8:VDD
ks8:VSS
ks8:DIN
kr1:GND
kr1:VCC
kr1:DIN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