#include <FastLED.h>
#define DATA_PIN 3
#define LED_TYPE WS2812
#define COLOR_ORDER GRB
#define SIDE 8
#define NUM_LEDS 64
#define BRIGHTNESS 255
CRGB leds[NUM_LEDS];
int matrix[SIDE][SIDE];
void setup(){
Serial.begin(9600);
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(100);//max 255
int index = 0;
for(int i = 0 ; i < SIDE ; ++i){
for(int j = 0 ; j < SIDE ; ++j){
matrix[i][j] = index;
index++;
}
}
}
void loop(){
Serial.println("sftgh");
leds[16] = CRGB::Red;
FastLED.show();
for(int i = 0 ; i < SIDE ; ++i){
for(int j = 0 ; j < SIDE ; ++j){
Serial.print("matrix[i][j]");
}
Serial.println("");
}delay(10000);
}Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1