Helloquadrat

Aus machquadrat wiki

HELLOQUADRAT

Code:
#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        3
#define COLOR_ORDER    RGB
#define CHIPSET        WS2812B
#define MATRIX_WIDTH   10
#define MATRIX_HEIGHT  10
#define MATRIX_TYPE    HORIZONTAL_ZIGZAG_MATRIX
cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;
cLEDText ScrollingMsg;
const unsigned char TxtDemo[] = {  EFFECT_FRAME_RATE "\x02"
EFFECT_SCROLL_LEFT "  " 
EFFECT_HSV_AH "\x00\xff\xff\xff\xff\xff" "    MACHQUADRAT   *   HACKERSPACE GLEISDORF    "
EFFECT_SCROLL_UP "\x00\xff\xff\xff\xff\x04" "    B E S U C H T   U N S   A U F   M A C H Q U A D R A T .   O R G    "
};
void setup()
{
 FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
 FastLED.setBrightness(64);
 FastLED.clear(true);
 delay(500);
 FastLED.showColor(CRGB::Red);
 delay(200);
 FastLED.showColor(CRGB::Lime);
 delay(200);
 FastLED.showColor(CRGB::Blue);
 delay(200);
 FastLED.showColor(CRGB::White);
 delay(200);
 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);