Nano Every + WS2812B - I must be doing something dumb?

I'm having a heck of a time getting a strip of LEDs going with the Nano Every. This is a BTF lighting WS2812B strip, about 1m long. Here's how it is wired up:

Capacitor is right at the LEDs (on the "extra" red/white pair that I assume is for power injection and which is parallel with +/-). Resistor is closer to the arduino. Here is the code:

#define LED_DATA_OUT_PIN 7
#include "FastLED.h"
#define NUM_LEDS 200

CRGB leds[NUM_LEDS];

void setup()
{
  Serial.begin(57600);
  while (!Serial) { ; }

  FastLED.addLeds<WS2812B, LED_DATA_OUT_PIN, GRB>(leds, NUM_LEDS);
}

void loop()
{
  for (int i=0; i++; i<NUM_LEDS)
  {
    if (i<30)
    {
      leds[i] = CRGB(255,0,0);
    } else leds[i] = CRGB(0,0,0);
  }
  Serial.println("RED");
  FastLED.show();
  delay(300);
  for (int i=0; i++; i<NUM_LEDS)
  {
    if (i<30)
    {
    leds[i] = CRGB(0,255,0);
    } else leds[i] = CRGB(0,0,0);
  }
  Serial.println("GREEN");
  FastLED.show();
  delay(300);
  for (int i=0; i++; i<NUM_LEDS)
  {
    if (i<30)
    {
    leds[i] = CRGB(0,0,255);
    } else leds[i] = CRGB(0,0,0);
  }
  Serial.println("BLUE");
  FastLED.show();
  delay(1000);
}

There are maybe 120 lights in the strip, so I make an array of 200 and black all of them out except the first 30. I get nothing: no lights. If I wire it up like this, powering the arduino from the computer USB instead of the PSU, I also get nothing:

...however, if I disconnect the ground from the arduino as indicated in that image, I get random lights flashing along the strip, random colors, etc.

I have two of these strips; same thing with both of them. I see 5V on the LED strip pads, as expected. I think all the connections are sound.

Anything obvious that I'm doing wrong? Thanks!

Hello

for (int i=0; i++; i<NUM_LEDS)

That's not how to use a for loop :slight_smile:

Argh! I new when I saw a response come in like 10 seconds after I posted that it must be something extra dumb. :slight_smile: Thanks.