#include "FastLED.h"
#define DATA_PIN 3
#define LED_H 8
#define LED_W 8
#define NUM_LEDS LED_H * LED_W * 3
CRGB leds[NUM_LEDS];
byte a8x8[LED_H][LED_W][3];
byte a[LED_H][LED_W*3][3];
void setup() {
delay(2000);
// Uncomment one of the following lines for your leds arrangement.
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
//FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
// FastLED.setBrightness(CRGB(255,255,255));
clearmainarray();
}
void loop() {
n2();
Move_Animation(1, 0, 0, 0, 0, 100, 5);
Move_Animation(0, 1, 0, 0, 0, 100, 1);
Move_Animation(0, 0, 1, 0, 0, 100, 1);
// Move_Animation(0, 0, 0, 1, 0, 100, 5);
// Move_Animation(0, -1, 0, 0, 0, 100, 5);
}
void display() {
for (byte qq = 0; qq < LED_W * 3; qq++) {
if (qq % 2 == 0) {
for (byte q = 0; q < LED_H; q++) {
leds[q + (qq * LED_H)] = CRGB(a[q][qq][0], a[q][qq][1], a[q][qq][2]);
}
}
else {
for (byte q = 0; q < LED_H; q++) {
leds[q + (qq * LED_H)] = CRGB(a[LED_H - 1 - q][qq][0], a[LED_H - 1 - q][qq][1], a[LED_H - 1 - q][qq][2]);
}
}
}
FastLED.show();
}
void clearmainarray() {
for (byte z1 = 0; z1 < LED_H; z1++) {
for (byte z2 = 0; z2 < LED_W * 3; z2++) {
for (byte z3 = 0; z3 < 3; z3++) {
a[z1][z2][z3] = 0;
}
}
}
}
void cleara8x8() {
for (byte z1 = 0; z1 < LED_H; z1++) {
for (byte z2 = 0; z2 < LED_W; z2++) {
for (byte z3 = 0; z3 < 3; z3++) {
a8x8[z1][z2][z3] = 0;
}
}
}
}
void n2(){
cleara8x8();
a8x8[0][0][1] = 255;
a8x8[0][1][1] = 255;
a8x8[0][2][1] = 255;
a8x8[0][1][1] = 255;
a8x8[0][2][1] = 255;
a8x8[1][0][0] = 255;
a8x8[2][0][0] = 255;
a8x8[3][0][0] = 255;
a8x8[4][0][0] = 255;
a8x8[5][0][0] = 255;
a8x8[6][0][0] = 255;
a8x8[7][0][0] = 255;
}
void n1(){
cleara8x8();
a8x8[0][0][0] = 255;
a8x8[0][0][1] = 165;
a8x8[0][1][0] = 255;
a8x8[0][1][1] = 255;
a8x8[0][2][0] = 255;
a8x8[0][2][1] = 255;
a8x8[0][3][0] = 255;
a8x8[0][3][1] = 255;
a8x8[0][4][0] = 255;
a8x8[0][4][1] = 255;
a8x8[0][5][0] = 255;
a8x8[0][5][1] = 255;
a8x8[0][6][0] = 255;
a8x8[0][6][1] = 255;
a8x8[0][7][0] = 255;
a8x8[0][7][1] = 165;
a8x8[1][0][2] = 255;
a8x8[1][1][0] = 255;
a8x8[1][1][1] = 165;
a8x8[1][2][0] = 255;
a8x8[1][2][1] = 255;
a8x8[1][3][0] = 255;
a8x8[1][3][1] = 255;
a8x8[1][4][0] = 255;
a8x8[1][4][1] = 255;
a8x8[1][5][0] = 255;
a8x8[1][5][1] = 255;
a8x8[1][6][0] = 255;
a8x8[1][6][1] = 165;
a8x8[1][7][0] = 255;
a8x8[2][0][2] = 255;
a8x8[2][1][2] = 255;
a8x8[2][2][0] = 255;
a8x8[2][2][1] = 165;
a8x8[2][3][0] = 255;
a8x8[2][3][1] = 255;
a8x8[2][4][0] = 255;
a8x8[2][4][1] = 255;
a8x8[2][5][0] = 255;
a8x8[2][5][1] = 165;
a8x8[2][6][0] = 255;
a8x8[2][7][0] = 255;
a8x8[3][0][2] = 255;
a8x8[3][1][2] = 255;
a8x8[3][2][2] = 255;
a8x8[3][3][0] = 255;
a8x8[3][3][1] = 165;
a8x8[3][4][0] = 255;
a8x8[3][4][1] = 165;
a8x8[3][5][0] = 255;
a8x8[3][6][0] = 255;
a8x8[3][7][0] = 255;
a8x8[4][0][2] = 255;
a8x8[4][1][2] = 255;
a8x8[4][2][2] = 255;
a8x8[4][3][0] = 255;
a8x8[4][3][1] = 165;
a8x8[4][4][0] = 255;
a8x8[4][4][1] = 165;
a8x8[4][5][0] = 255;
a8x8[4][6][0] = 255;
a8x8[4][7][0] = 255;
a8x8[5][0][2] = 255;
a8x8[5][1][2] = 255;
a8x8[5][2][0] = 255;
a8x8[5][2][1] = 165;
a8x8[5][3][0] = 255;
a8x8[5][3][1] = 255;
a8x8[5][3][2] = 255;
a8x8[5][4][0] = 255;
a8x8[5][4][1] = 255;
a8x8[5][4][2] = 255;
a8x8[5][5][0] = 255;
a8x8[5][5][1] = 165;
a8x8[5][6][0] = 255;
a8x8[5][7][0] = 255;
a8x8[6][0][2] = 255;
a8x8[6][1][0] = 255;
a8x8[6][1][1] = 165;
a8x8[6][2][0] = 255;
a8x8[6][2][1] = 255;
a8x8[6][2][2] = 255;
a8x8[6][3][0] = 255;
a8x8[6][3][1] = 255;
a8x8[6][3][2] = 255;
a8x8[6][4][0] = 255;
a8x8[6][4][1] = 255;
a8x8[6][4][2] = 255;
a8x8[6][5][0] = 255;
a8x8[6][5][1] = 255;
a8x8[6][5][2] = 255;
a8x8[6][6][0] = 255;
a8x8[6][6][1] = 165;
a8x8[6][7][0] = 255;
a8x8[7][0][0] = 255;
a8x8[7][0][1] = 165;
a8x8[7][1][0] = 255;
a8x8[7][1][1] = 255;
a8x8[7][1][2] = 255;
a8x8[7][2][0] = 255;
a8x8[7][2][1] = 255;
a8x8[7][2][2] = 255;
a8x8[7][3][0] = 255;
a8x8[7][3][1] = 255;
a8x8[7][3][2] = 255;
a8x8[7][4][0] = 255;
a8x8[7][4][1] = 255;
a8x8[7][4][2] = 255;
a8x8[7][5][0] = 255;
a8x8[7][5][1] = 255;
a8x8[7][5][2] = 255;
a8x8[7][6][0] = 255;
a8x8[7][6][1] = 255;
a8x8[7][6][2] = 255;
a8x8[7][7][0] = 255;
a8x8[7][7][1] = 165;
}