//test matrix layout

#include "FastLED.h"
 
// Matrix size
#define NUM_ROWS 15
#define NUM_COLS 13
#define NUM_LEDS NUM_ROWS * NUM_COLS
 
// LEDs pin
#define DATA_PIN 5   
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB
 
// LED brightness
#define BRIGHTNESS 255
#define MAX_POWER_MILLIAMPS 700 
 
// Define the array of leds
CRGB leds[NUM_LEDS];


void setup() {
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
  // FastLED.setMaxPowerInVoltsAndMilliamps(5, MAX_POWER_MILLIAMPS);
  FastLED.setBrightness(BRIGHTNESS);
}
 
void loop() {
static byte index = 0;
fadeToBlackBy(leds, NUM_LEDS, 10);
leds [index++].setHue(sin8(index*255/(NUM_LEDS-1)+millis()/16));
FastLED.show();
delay (30);
}