#include "Charliplexing.h"
#include "Figure.h"

void setup(){
    LedSign::Init();
}

const uint8_t GRID_HEIGHT = 6;
const uint8_t GRID_WIDTH = 9;
const int CHAR_NUM = 3;
int grid[CHAR_NUM][GRID_HEIGHT][GRID_WIDTH] = 
{ 
    {
        {1,1,1,0,1,1,1,0,0},
        {1,0,1,0,1,0,0,0,0},
        {1,1,1,0,1,1,1,0,0},
        {1,0,1,0,0,0,1,0,0},
        {1,1,1,0,1,1,1,0,0},
        {0,0,0,0,0,0,0,0,0}
    },

    {
        {0,0,1,1,1,1,1,0,0},
        {0,1,0,0,0,0,0,1,0},
        {1,0,0,1,0,1,0,0,1},
        {1,0,0,0,0,0,0,0,1},
        {0,1,0,0,0,0,0,1,0},
        {0,0,1,1,1,1,1,0,0}
    },

    {
        {0,0,0,0,0,0,0,0,0},
        {0,0,1,1,0,1,1,0,0},
        {0,0,1,1,0,1,1,0,0},
        {0,0,1,1,0,1,1,0,0},
        {1,0,0,0,0,0,0,0,1},
        {0,1,1,1,1,1,1,1,0}
    }
};

void loop(){
    for(int c=0; c<CHAR_NUM; c++){
        for(int y=0; y<GRID_HEIGHT; y++){
            for(int x=0; x<GRID_WIDTH; x++){
                LedSign::Set(y,GRID_WIDTH-x-1,grid[c][y][x]);
                delay(5);
            }
        }
        delay(200);
    }
}