#include <FastLED.h>
#include "LEDMatrix.h"
#include "LEDText.h"
#include "FontMatrise.h"
#define LED_PIN 2
#define COLOR_ORDER GRB
#define CHIPSET WS2812B
cLEDMatrix<32, 32, VERTICAL_ZIGZAG_MATRIX> leds;
cLEDText ScrollingMsg;
const unsigned char TxtDemo[] = { " EYUP " };
void setup()
{
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
FastLED.setBrightness(255);
FastLED.clear(true);
delay(500);
FastLED.showColor(CRGB::Red);
delay(1000);
FastLED.show();
ScrollingMsg.SetFont(MatriseFontData); //YAZIYA FONT ATAMASI YAPIYOR
ScrollingMsg.Init(&leds, leds.Width(), ScrollingMsg.FontHeight() + 1, 0, 0);
ScrollingMsg.SetScrollDirection(SCROLL_UP); //YAZININ KAYMA DURUMUNU ÇEVİRİYOR
ScrollingMsg.SetTextDirection(CHAR_LEFT); // YAZININ YÖNÜNÜ ÇEVİRİYOR
}
void loop() {
if (ScrollingMsg.UpdateText() == -1)
{
ScrollingMsg.SetText((unsigned char *)TxtDemo, sizeof(TxtDemo) -1);
ScrollingMsg.UpdateText();
}
else{
FastLED.show();
delay(10);
}
}