#define FASTLED_ALLOW_INTERRUPTS 0
#include <FastLED.h>
FASTLED_USING_NAMESPACE
#define DATA_PIN 3
#define WIDTH 18
#define HEIGHT 7
#define NUM_LEDS WIDTH * HEIGHT //126
#define MAX_POWER_MILLIAMPS 500
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define BRIGHTNESS 255
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(9600);
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setMaxPowerInVoltsAndMilliamps( 5, MAX_POWER_MILLIAMPS);
FastLED.setBrightness(BRIGHTNESS);
FastLED.clear();
FastLED.show();
leds[0] = CRGB::Red;
FastLED.show();
}
void loop() {
EVERY_N_MILLISECONDS(500) {
Serial.println( "ok" );
FastLED.show();
}
}