
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define PIN 3
// Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(matrixWidth, matrixHeight, tilesX, tilesY, pin, matrixType, ledType);
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, 1, 1, PIN,
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);
// String affiche = "Joyeux no" + String(char(137)) + "l, les STI2D !!!";
String affiche = "J'" + String(char(03)) + " les Sciences de l'Ing" + String(char(136)) + "nieur ! ";
int x = matrix.width();
int Rcomp, Gcomp, Bcomp;
void setup() {
Serial.begin(9600);
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(5);
matrix.setTextColor(matrix.Color(255, 255, 255));
}
void loop() {
matrix.fillScreen(0); //Turn off all the LEDs
matrix.setCursor(x, 0);
matrix.print(affiche);
if( --x < -(6*(int)affiche.length())) {
x = matrix.width();
Rcomp = random(0, 255);
Gcomp = random(0, 255);
Bcomp = random(0, 255);
matrix.setTextColor(matrix.Color(Rcomp, Gcomp, Bcomp));
Serial.print(Rcomp); Serial.print(", ");
Serial.print(Gcomp); Serial.print(", ");
Serial.print(Bcomp); Serial.println(" ");
}
matrix.show();
delay(20);
}
