2 Metre LED Strip code not working, - please help!

code not working

#include <FastLED.h>

  #define NUM_LEDS 120
 #define LED_PIN 11
  #define LED_PIN 10
   #define LED_PIN 9
    #define LED_PIN 6

 CRGB leds[NUM_LEDS];

 void setup () {
  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setBrightness(50);
  delay(2000);
 }

  void loop () {
  fill_gradient_RGB (leds, NUM_LEDS, CRGB::Yellow, CRGB::Magenta, CRGB::Blue, CRGB::Green);
  FastLED.show();
  delay(500);

  fill_gradient_RGB (leds, NUM_LEDS, CRGB::Green, CRGB::Yellow, CRGB::Magenta, CRGB::Blue);
  FastLED.show();
  delay(500);

  fill_gradient_RGB (leds, NUM_LEDS, CRGB::Blue, CRGB::Green, CRGB::Yellow, CRGB::Magenta);
  FastLED.show();
  delay(500);

  fill_gradient_RGB (leds, NUM_LEDS, CRGB::Magenta, CRGB::Blue, CRGB::Green, CRGB::Yellow);
  FastLED.show();
  delay(500);
 }
 #define LED_PIN 11
  #define LED_PIN 10
   #define LED_PIN 9
    #define LED_PIN 6

Which pin is the LED strip DI pad connected to ?

6 is din and 10 is do

After your defines LED_PIN = 6...
And that pin will be used by fastled to control your strip...

Are you saying that the DO pad of the LED strip is connected to Arduino pin 10 ?

yes

The DO pad should not be connected to the Arduino

where does it go because im not using a breadboard

DO is pin 10 on the arduino
also i am using the arduino max 2650

This is how you should wire WS2812B (thanks @LarryD

You will also need to apply power to the strip at about every 50 LEDs (use thick wire).

And your power supply must be able to handle 120x60mA if you need every LED on full white; a 5V 7.5A power supply will do.

It is the Data Out pin of the LED strip and is used to pass data to a second LED strip if you have one

Then what did you have in mind when you wrote this???????

@fireheart123 - You trying to use the hardware configuration of your RGBLED sketch on your WS2812. They are NOT the same. You can NOT use the same sketch on both. You must write a WS2812 sketch.

You need to know your data pin. See post #10.

Here is an example code to run...

#include <FastLED.h> // https://github.com/FastLED/FastLED

#define LED_NUM   120
#define LED_PIN    10 // data pin
#define MAXBRIGHT 255 // verify sufficient power supply (LED_NUM * 60mA)

CRGB leds[LED_NUM]; // LED object

void setup() {
  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, LED_NUM); // configure LED object
  FastLED.setBrightness(MAXBRIGHT); // set brightness
  FastLED.clear(); // clear data buffer
  FastLED.show(); // show data buffer
}

void loop() {
  test(); // call the function
}

void test() {
  for (int i = 0; i < LED_NUM; i++) { // loop through all LEDs
    leds[i] = CRGB((i % 3 == 0) * 255, (i % 3 == 1) * 255, (i % 3 == 2) * 255); // RGB data to buffer
    FastLED.show();
    delay(100); // pause between LEDs
    FastLED.clear();
    FastLED.show();
  }
}
diagram.json for wokwi.com

{
  "version": 1,
  "author": "Anonymous maker",
  "editor": "wokwi",
  "parts": [
    { "type": "wokwi-arduino-nano", "id": "nano", "top": 0, "left": 0, "attrs": {} },
    {
      "type": "wokwi-neopixel-matrix",
      "id": "ring1",
      "top": -246,
      "left": -79.05,
      "attrs": { "pixleate": "1", "rows": "10", "cols": "12" }
    },
    { "type": "wokwi-vcc", "id": "vcc1", "top": -18.44, "left": 192, "attrs": {} },
    { "type": "wokwi-gnd", "id": "gnd1", "top": 0, "left": -19.8, "attrs": {} }
  ],
  "connections": [
    [ "nano:6", "ring1:DIN", "green", [ "v0" ] ],
    [ "gnd1:GND", "ring1:GND", "black", [ "v-9.6", "h124.8" ] ],
    [ "vcc1:VCC", "ring1:VCC", "red", [ "v9.6", "h-19.2", "v-28.8", "h-115.2" ] ]
  ],
  "dependencies": {}
}

i have 11, 10, and 9 pins for r, g, b

You used the name LED_PIN for every one. They must all have different names.

ohh ok

But as you are using an addressable LED strip you actually only need one data pin to drive it, not 3 as you do with an RGB LED strip that requires one for each LED colour

Also, how are you powering the LED strips?

With LED in the strip capable of showing white, will require 60mA. So if you have 120 of these you require a 5V power supply capable of providing at least 7.2 Amps current? I would recommend you get a power supply capable of 8 to 10 Amps.

im not quite sure what you mean

but what if its a double ended strip?
then how does it power itself?