//test matrix layout

#include "FastLED.h"
 
// Matrix size
#define NUM_ROWS 1
#define NUM_COLS 16+8
#define NUM_LEDS NUM_ROWS * NUM_COLS
 
// LEDs pin
#define DATA_PIN 0   
#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, 20);
  leds [index].setHue(sin8(index*255/(NUM_LEDS-1)+millis()/16));
  index = (++index)%(NUM_LEDS);
  FastLED.show();
  delay (50);
}