@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": {}
}