#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define PIN 3
// MATRIX DECLARATION:
// Parameter 1 = width of NeoPixel matrix
// Parameter 2 = height of matrix
// Parameter 3 = pin number
// Parameter 4 = matrix layout flags, add together as needed:
// Parameter 5 = pixel type flags,
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 16, PIN,
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);
const uint16_t colors[] = {
matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(255, 255, 0),matrix.Color(0, 0, 255), matrix.Color(255, 0, 255), matrix.Color(0, 255, 255), matrix.Color(255, 255, 255)};
void setup() {
//Serial.begin(115200);
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(9);
matrix.setTextColor(colors[0]);
}
int x = matrix.width();
int y = matrix.height();
int pass = 0;
void loop() {
//matrix.fillScreen(0); //Turn off all the LEDs
matrix.setCursor(x, 0);
// matrix.print(F("WELCOME TO MY WORLD"));
matrix.print(F("1"));
//matrix.setCursor(x, 8);
//matrix.print(F(" RS - 3D"));
//matrix.setTextColor(colors[1]);
// if( --x < -90 ) {
//x = matrix.width();
x = 30;
// if(++pass >= 8) pass = 0;
matrix.setTextColor(colors[4]);
// }
//Serial.println(x);
matrix.show();
delay(2000);
}