// #include <FastLED.h>
// #define NUM_LEDS 256
// #define DATA_PIN 26
// CRGB leds[NUM_LEDS];
// void setup() {
// FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
// }
// void loop() {
// leds[0] = CRGB(255, 37, 37);
// FastLED.show();
// leds[1] = CRGB(126, 5, 255);
// FastLED.show();
// delay(1000);
// leds[0] = CRGB(126, 5, 255);
// FastLED.show();
// leds[1] = CRGB(255, 37, 37);
// FastLED.show();
// delay(1000);
// }
// #include <FastLED.h>
// #include "LEDMatrix.h"
// // Change the next 6 defines to match your matrix type and size
// #define LED_PIN 26
// #define COLOR_ORDER RGB
// #define CHIPSET NEOPIXEL
// #define MATRIX_WIDTH -32 // Set this negative if physical led 0 is opposite to where you want logical 0
// #define MATRIX_HEIGHT 8 // Set this negative if physical led 0 is opposite to where you want logical 0
// #define MATRIX_TYPE HORIZONTAL_ZIGZAG_MATRIX // See top of LEDMatrix.h for matrix wiring types
// cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;
// uint8_t hue;
// int16_t counter;
// void setup()
// {
// FastLED.addLeds<CHIPSET, LED_PIN>(leds[0], leds.Size());
// FastLED.setBrightness(127);
// FastLED.clear(true);
// delay(500);
// FastLED.showColor(CRGB::Red);
// delay(1000);
// FastLED.showColor(CRGB::Lime);
// delay(1000);
// FastLED.showColor(CRGB::Blue);
// delay(1000);
// FastLED.showColor(CRGB::White);
// delay(1000);
// FastLED.clear(true);
// hue = 0;
// counter = 0;
// }
// void loop()
// {
// int16_t sx, sy, x, y;
// uint8_t h;
// FastLED.clear();
// h = hue;
// if (counter < 1125)
// {
// // ** Fill LED's with diagonal stripes
// for (x=0; x<(leds.Width()+leds.Height()); ++x)
// {
// leds.DrawLine(x - leds.Height(), leds.Height() - 1, x, 0, CHSV(h, 255, 255));
// h+=16;
// }
// }
// else
// {
// // ** Fill LED's with horizontal stripes
// for (y=0; y<leds.Height(); ++y)
// {
// leds.DrawLine(0, y, leds.Width() - 1, y, CHSV(h, 255, 255));
// h+=16;
// }
// }
// hue+=4;
// if (counter < 125)
// ;
// else if (counter < 375)
// leds.HorizontalMirror();
// else if (counter < 625)
// leds.VerticalMirror();
// else if (counter < 875)
// leds.QuadrantMirror();
// else if (counter < 1125)
// leds.QuadrantRotateMirror();
// else if (counter < 1250)
// ;
// else if (counter < 1500)
// leds.TriangleTopMirror();
// else if (counter < 1750)
// leds.TriangleBottomMirror();
// else if (counter < 2000)
// leds.QuadrantTopTriangleMirror();
// else if (counter < 2250)
// leds.QuadrantBottomTriangleMirror();
// counter++;
// if (counter >= 2250)
// counter = 0;
// FastLED.show();
// }
#include <FastLED.h>
#include "LEDMatrix.h"
#include "LEDText.h"
#include "FontMatrise.h"
// Change the next 6 defines to match your matrix type and size
#define LED_PIN 26
#define CHIPSET NEOPIXEL
#define MATRIX_WIDTH -32
#define MATRIX_HEIGHT -8
#define MATRIX_TYPE HORIZONTAL_ZIGZAG_MATRIX
cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;
cLEDText ScrollingMsg;
const unsigned char TxtDemo[] = { EFFECT_SCROLL_LEFT " LEFT SCROLL "};
void setup()
{
FastLED.addLeds<CHIPSET, LED_PIN>(leds[0], leds.Size());
FastLED.setBrightness(255);
FastLED.clear(true);
delay(500);
FastLED.showColor(CRGB::Red);
delay(1000);
FastLED.showColor(CRGB::Lime);
delay(1000);
FastLED.showColor(CRGB::Blue);
delay(1000);
FastLED.showColor(CRGB::White);
delay(1000);
FastLED.show();
ScrollingMsg.SetFont(MatriseFontData);
ScrollingMsg.Init(&leds, leds.Width(), ScrollingMsg.FontHeight() + 1, 0, 0);
ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
ScrollingMsg.SetTextColrOptions(COLR_RGB | COLR_SINGLE, 0xff, 0x00, 0xff);
}
void loop()
{
if (ScrollingMsg.UpdateText() == -1)
ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) - 1);
else
FastLED.show();
delay(10);
}