forked from pludi/LEDDisplay
33 lines
896 B
C++
33 lines
896 B
C++
#include <Adafruit_GFX.h>
|
|
#include <Adafruit_NeoMatrix.h>
|
|
#include <Adafruit_NeoPixel.h>
|
|
|
|
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(16, 16, 2, 1, 16, NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_COLUMNS +
|
|
NEO_MATRIX_ZIGZAG + NEO_TILE_TOP + NEO_TILE_LEFT + NEO_TILE_ROWS +
|
|
NEO_TILE_PROGRESSIVE, NEO_GRB + NEO_KHZ800);;
|
|
int i=0;
|
|
|
|
void setup(){
|
|
matrix.begin();
|
|
matrix.setTextSize(1);
|
|
matrix.setTextColor(matrix.Color(0,0,100));
|
|
Serial.begin(9600);
|
|
matrix.setTextWrap(false);
|
|
Serial.println("Setup Done");
|
|
|
|
}
|
|
|
|
void loop(){
|
|
Serial.println(i);
|
|
matrix.setCursor(i,0);
|
|
matrix.fillScreen(matrix.Color(0,0,0));
|
|
matrix.print(F("/usr/space"));
|
|
portDISABLE_INTERRUPTS();
|
|
delay(1);
|
|
matrix.show();
|
|
portENABLE_INTERRUPTS();
|
|
if(--i<-11*6)
|
|
i=matrix.width();
|
|
delay(249);
|
|
}
|