Having really weird light effects on my lights strips with ESP32

I have been trying to connect a 30 led individually adressable led strip to my ESP32 but I have been having weird results. I have the DIN pin connected to pin 17, with +5 and GND going to an external 1.2A 5V supply. I am using this simple script:

#include <FastLED.h>
#define LED_PIN     17
#define NUM_LEDS    30
CRGB leds[NUM_LEDS];
void setup() {
  Serial.begin(115200);
  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
  
}
void loop() {  
  for(int i = 0; i < NUM_LEDS; i++){
    leds[i] = CRGB(i, i*2, i*3);
    FastLED.show();
    delay(100);
  }
}

but I am getting random flickering and sometimes it just doesn't seem to update the leds.
I filmed a video of the leds which can be seen here: Imgur: The magic of the Internet

Thanks,
Dream

(deleted)

spycatcher2k:
have you connected both grounds together?

Both grounds of what? On my led strips?
If so, no, and I will try it.

(deleted)

Yep, that has done it. The problem was that I was connecting it to the wrong ground. It tried the ground nearest the usb socket and that just did not work. The working ground was oposite 3.3V

Thanks anyway,
Dream