// HERŞEYÇOKAKILLICAOLMAKZORUNDADEĞİL

// 6 JUN 2017 * gorkemozdemir.com

// based on

// testshapes demo for Adafruit RGBmatrixPanel library.

// Demonstrates the drawing abilities of the RGBmatrixPanel library.

// For 32x32 RGB LED matrix:

// http://www.adafruit.com/products/607

// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon

// for Adafruit Industries.

// BSD license, all text above must be included in any redistribution.

#include <Adafruit_GFX.h> // Core graphics library

#include <RGBmatrixPanel.h> // Hardware-specific library

// If your 32x32 matrix has the SINGLE HEADER input,

// use this pinout:

#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega)

#define OE 9

#define LAT 10

#define A A0

#define B A1

#define C A2

#define D A3

// If your matrix has the DOUBLE HEADER input, use:

//#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega)

//#define LAT 9

//#define OE 10

//#define A A3

//#define B A2

//#define C A1

//#define D A0

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);

int lightON = 50;

int lightOFF = 10;

void setup() {

// obligatory space / mecburi boşluk

}

void loop() {

// macera başlasın!

matrix.begin();

// 32 adet for döngüsü

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 0, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 1, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 2, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 3, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 4, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 5, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 6, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 7, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 8, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 9, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 10, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 11, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 12, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 13, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 14, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 15, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 16, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 17, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 18, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 19, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 20, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 21, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 22, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 23, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 24, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 25, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 26, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 27, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 28, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 29, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 30, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}

for (int xValue =0; xValue < 31; xValue++) {

matrix.drawPixel(xValue, 31, matrix.Color333(7, 7, 7));

delay(lightON);

matrix.fillScreen(matrix.Color333(0, 0, 0));

delay(lightOFF);

}