Permalink
Switch branches/tags
Nothing to show
Find file
57409a9 Apr 26, 2015
28 lines (22 sloc) 487 Bytes
#include <SPI.h>
#include "LedMatrix.h"
#define NUMBER_OF_DEVICES 6
#define CS_PIN 2
LedMatrix ledMatrix = LedMatrix(NUMBER_OF_DEVICES, CS_PIN);
int x = 0;
void setup() {
ledMatrix.init();
ledMatrix.setText("MAX7219 Animation Demo");
ledMatrix.setNextText("Second text");
}
void loop() {
ledMatrix.clear();
ledMatrix.scrollTextLeft();
ledMatrix.drawText();
ledMatrix.commit();
delay(50);
x=x+1;
if (x == 400) {
ledMatrix.setNextText("Third text");
}
}