diff --git a/FIRMWARE/PIXO_WIP/PIXO_WIP.ino b/FIRMWARE/PIXO_WIP/PIXO_WIP.ino new file mode 100644 index 0000000..4fd8d74 --- /dev/null +++ b/FIRMWARE/PIXO_WIP/PIXO_WIP.ino @@ -0,0 +1,165 @@ +// Adafruit_DotStarMatrix example for single DotStar LED matrix. +// Scrolls 'Adafruit' across the matrix. + +#include +#include +#include +#include +#include +#include "image.h" + +#define DATAPIN 19 +#define CLOCKPIN 18 + + +#define SHIFTDELAY 100 +#define BRIGHTNESS 50 + +// MATRIX DECLARATION: +// Parameter 1 = width of DotStar matrix +// Parameter 2 = height of matrix +// Parameter 3 = pin number (most are valid) +// Parameter 4 = matrix layout flags, add together as needed: +// DS_MATRIX_TOP, DS_MATRIX_BOTTOM, DS_MATRIX_LEFT, DS_MATRIX_RIGHT: +// Position of the FIRST LED in the matrix; pick two, e.g. +// DS_MATRIX_TOP + DS_MATRIX_LEFT for the top-left corner. +// DS_MATRIX_ROWS, DS_MATRIX_COLUMNS: LEDs are arranged in horizontal +// rows or in vertical columns, respectively; pick one or the other. +// DS_MATRIX_PROGRESSIVE, DS_MATRIX_ZIGZAG: all rows/columns proceed +// in the same order, or alternate lines reverse direction; pick one. +// See example below for these values in action. +// Parameter 5 = pixel type: +// DOTSTAR_BRG Pixels are wired for BRG bitstream (most DotStar items) +// DOTSTAR_GBR Pixels are wired for GBR bitstream (some older DotStars) +// DOTSTAR_BGR Pixels are wired for BGR bitstream (APA102-2020 DotStars) + +Adafruit_DotStarMatrix matrix = Adafruit_DotStarMatrix( + 16, 16, DATAPIN, CLOCKPIN, + DS_MATRIX_BOTTOM + DS_MATRIX_LEFT + + DS_MATRIX_ROWS + DS_MATRIX_PROGRESSIVE, + DOTSTAR_BGR); + +const uint16_t primaryColors[] = { + matrix.Color(100, 0, 0), matrix.Color(0, 100, 0), matrix.Color(0, 0, 100) +}; + +const uint16_t adaColors[] = { + matrix.Color(255, 0, 0), //A red + matrix.Color(255, 125, 0), //D orange + matrix.Color(200, 255, 0), //A yellowish + matrix.Color(0, 255, 0), //F green + matrix.Color(0, 255, 225), //R blue + matrix.Color(150, 0, 255), //U purple + matrix.Color(255, 0, 220), //I pink + matrix.Color(255, 65, 0), //T reddish + matrix.Color(255, 220, 0) //! orange/yellow +}; + +char adafruit[] = "ADAFRUIT!"; + +void setup() { + Serial.begin(115200); + + // uncomment to have wait + //while (!Serial) delay(500); + + matrix.begin(); + + for (byte i = 0; i < 3; i++) { + matrix.fillScreen(primaryColors[i]); + matrix.show(); + delay(500); + matrix.fillScreen(0); + matrix.show(); + } +} + +int x = matrix.width(); +int pass = 0; + +void loop() { + matrix.setBrightness(BRIGHTNESS); + while(1){ + // pongDemo(); + SinglePix(); + // RandomPix(); + //} + //notification(); + + } + +void SinglePix(){ + for (int x = 0; x<256;x++){ + + matrix.setPixelColor(x, 255, 255, 255); + delay(10); + matrix.show(); + delay(200); +} +} + +void RandomPix(){ + randomSeed(A1); + int x = random(0,256); + matrix.fillScreen(0); + matrix.setPixelColor(x, 255, 255, 255); + matrix.show(); + delay(50); + +} + +void notification(){ + for (int j = 15; j>=0;j--){ + matrix.fillScreen(0); + for (int i = 0; i<256; i++) { + matrix.setPixelColor(i+(j*16), upvote[i][0], upvote[i][1], upvote[i][2]); + //Serial.println(i); + //delay(1); + } + matrix.show(); + delay(15); + } + delay(1000); + for (int j = 0; j>=-16;j--){ + matrix.fillScreen(0); + for (int i = 0; i<256; i++) { + matrix.setPixelColor(i+(j*16), upvote[i][0], upvote[i][1], upvote[i][2]); + //Serial.println(i); + //delay(1); + } + matrix.show(); + delay(15); + } + delay(1000); + matrix.fillScreen(0); + matrix.show(); +} + +float ballx = 5; +float bally = 5; +float paddle1, paddle2 = 3; +float ballvx = -0.3; +float ballvy = 0.1; + +void pongDemo(){ + matrix.fillScreen(0); + matrix.drawFastVLine(0, (int)paddle1, 6, (200,200,200)); + matrix.drawFastVLine(15, (int)paddle2, 6, (200,200,200)); + matrix.drawPixel((int)ballx,(int)bally,(200,200,200)); + if (ballx > 14 || ballx<1){ + ballvx = ballvx *-1; + } + if (bally > 14 || bally<0){ + ballvy = ballvy * -1; + } + paddle1 = bally-3; + paddle2 = bally-3; + ballx = ballx + ballvx; + bally = bally + ballvy; + Serial.print(ballx); + Serial.print(","); + Serial.println(bally); + matrix.show(); + delay(30); +} + diff --git a/FIRMWARE/PIXO_WIP/image.h b/FIRMWARE/PIXO_WIP/image.h new file mode 100644 index 0000000..9777150 --- /dev/null +++ b/FIRMWARE/PIXO_WIP/image.h @@ -0,0 +1,7 @@ +int twitter[256][3] = {{40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {42, 171, 225}, {43, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {42, 171, 225}, {41, 170, 225}, {40, 170, 225}, {40, 170, 225}, {41, 170, 225}, {41, 170, 225}, {29, 166, 223}, {28, 165, 223}, {40, 170, 225}, {39, 169, 225}, {39, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {30, 166, 224}, {37, 169, 225}, {44, 171, 225}, {41, 170, 225}, {38, 169, 225}, {36, 168, 224}, {96, 192, 233}, {101, 194, 234}, {39, 169, 225}, {43, 171, 225}, {43, 171, 225}, {39, 170, 225}, {40, 170, 225}, {40, 170, 225}, {39, 170, 225}, {42, 171, 225}, {152, 214, 241}, {56, 176, 227}, {24, 164, 223}, {42, 171, 225}, {35, 168, 224}, {169, 221, 243}, {255, 255, 255}, {255, 255, 255}, {212, 238, 249}, {171, 221, 243}, {50, 174, 226}, {38, 169, 225}, {41, 170, 225}, {40, 170, 225}, {40, 170, 225}, {35, 168, 224}, {230, 245, 252}, {224, 242, 251}, {99, 193, 233}, {34, 167, 224}, {58, 177, 227}, {255, 255, 255}, {253, 254, 255}, {250, 253, 254}, {255, 255, 255}, {169, 221, 243}, {37, 169, 224}, {41, 170, 225}, {40, 170, 225}, {40, 170, 225}, {42, 170, 225}, {33, 167, 224}, {153, 214, 241}, {255, 255, 255}, {255, 255, 255}, {220, 241, 250}, {199, 232, 247}, {253, 254, 255}, {255, 255, 255}, {253, 254, 255}, {253, 254, 255}, {85, 188, 231}, {27, 165, 223}, {43, 171, 225}, {40, 170, 225}, {40, 170, 225}, {41, 170, 225}, {33, 167, 224}, {193, 230, 246}, {255, 255, 255}, {251, 253, 255}, {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, {250, 253, 254}, {68, 181, 229}, {34, 168, 224}, {41, 171, 225}, {40, 170, 225}, {40, 170, 225}, {42, 171, 225}, {32, 167, 224}, {77, 184, 230}, {229, 245, 251}, {253, 254, 255}, {252, 254, 255}, {252, 254, 255}, {255, 255, 255}, {252, 254, 255}, {254, 255, 255}, {203, 234, 248}, {32, 167, 224}, {42, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {41, 170, 225}, {35, 168, 224}, {193, 230, 246}, {255, 255, 255}, {253, 254, 255}, {255, 255, 255}, {253, 254, 255}, {252, 254, 255}, {255, 255, 255}, {93, 191, 232}, {29, 166, 223}, {43, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {42, 171, 225}, {33, 167, 224}, {45, 172, 226}, {183, 226, 245}, {252, 254, 255}, {253, 254, 255}, {255, 255, 255}, {255, 255, 255}, {137, 208, 239}, {27, 165, 223}, {43, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {39, 170, 225}, {44, 172, 226}, {126, 204, 237}, {209, 237, 248}, {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, {214, 239, 249}, {106, 196, 234}, {27, 165, 223}, {42, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {39, 169, 225}, {49, 174, 226}, {85, 188, 231}, {109, 197, 235}, {108, 197, 235}, {80, 186, 231}, {39, 170, 225}, {28, 165, 223}, {42, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {38, 169, 225}, {30, 166, 224}, {27, 165, 223}, {27, 165, 223}, {31, 167, 224}, {40, 170, 225}, {43, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {42, 171, 225}, {43, 171, 225}, {43, 171, 225}, {42, 171, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}, {40, 170, 225}}; + +int ig[256][3] = {{0, 0, 0}, {182, 45, 118}, {190, 52, 133}, {177, 58, 155}, {176, 70, 183}, {166, 79, 206}, {159, 82, 215}, {155, 79, 212}, {151, 76, 208}, {148, 73, 203}, {144, 70, 199}, {140, 67, 194}, {128, 59, 178}, {125, 57, 176}, {118, 54, 163}, {0, 0, 0}, {209, 27, 81}, {204, 35, 93}, {217, 48, 127}, {184, 51, 134}, {169, 59, 155}, {158, 68, 177}, {148, 77, 200}, {143, 76, 200}, {141, 72, 193}, {138, 69, 189}, {133, 66, 184}, {129, 62, 180}, {129, 61, 179}, {142, 66, 199}, {121, 56, 171}, {118, 54, 163}, {221, 21, 56}, {241, 31, 82}, {206, 36, 94}, {184, 49, 120}, {197, 50, 125}, {184, 55, 144}, {169, 61, 161}, {155, 72, 185}, {147, 77, 201}, {144, 75, 195}, {143, 71, 196}, {142, 71, 198}, {131, 65, 172}, {129, 61, 178}, {142, 66, 198}, {121, 56, 170}, {236, 13, 35}, {232, 21, 56}, {213, 24, 65}, {202, 35, 92}, {215, 48, 127}, {197, 56, 146}, {184, 64, 167}, {176, 72, 190}, {165, 81, 211}, {155, 81, 214}, {153, 78, 210}, {145, 73, 199}, {137, 68, 189}, {127, 63, 178}, {129, 62, 181}, {128, 60, 179}, {255, 6, 18}, {235, 10, 28}, {213, 26, 67}, {239, 31, 81}, {203, 35, 93}, {194, 42, 112}, {196, 53, 138}, {175, 57, 151}, {163, 66, 171}, {162, 78, 202}, {148, 77, 202}, {133, 69, 185}, {138, 69, 190}, {137, 68, 188}, {128, 63, 179}, {141, 67, 195}, {255, 8, 3}, {246, 3, 8}, {226, 18, 46}, {245, 21, 56}, {216, 28, 75}, {210, 36, 95}, {192, 46, 118}, {171, 53, 137}, {171, 62, 161}, {157, 71, 180}, {155, 76, 198}, {148, 77, 204}, {150, 76, 205}, {139, 71, 192}, {136, 65, 184}, {143, 70, 198}, {255, 33, 1}, {246, 15, 1}, {241, 8, 24}, {253, 13, 34}, {234, 22, 59}, {216, 28, 71}, {199, 34, 89}, {205, 43, 113}, {190, 53, 138}, {176, 54, 142}, {151, 72, 176}, {155, 75, 196}, {159, 83, 219}, {143, 72, 196}, {137, 68, 186}, {147, 73, 202}, {255, 64, 1}, {246, 47, 3}, {246, 0, 2}, {255, 6, 15}, {235, 13, 35}, {216, 23, 54}, {216, 29, 75}, {217, 38, 100}, {197, 44, 116}, {206, 60, 155}, {179, 55, 137}, {158, 68, 175}, {177, 85, 222}, {145, 77, 202}, {141, 72, 191}, {151, 76, 207}, {255, 94, 1}, {246, 75, 3}, {244, 19, 2}, {255, 12, 2}, {245, 1, 9}, {227, 20, 48}, {242, 21, 56}, {212, 27, 74}, {205, 35, 91}, {211, 48, 126}, {186, 48, 126}, {170, 62, 162}, {191, 77, 202}, {153, 73, 189}, {144, 74, 199}, {155, 79, 211}, {255, 125, 1}, {248, 103, 3}, {244, 51, 2}, {255, 40, 0}, {246, 7, 1}, {231, 7, 23}, {237, 13, 33}, {242, 21, 56}, {222, 28, 74}, {231, 40, 105}, {196, 40, 105}, {178, 53, 137}, {201, 67, 177}, {165, 63, 165}, {146, 77, 202}, {158, 82, 215}, {255, 156, 1}, {246, 131, 3}, {244, 78, 2}, {255, 71, 0}, {255, 32, 1}, {245, 14, 0}, {231, 9, 32}, {244, 14, 37}, {232, 22, 60}, {208, 29, 77}, {195, 37, 97}, {199, 43, 114}, {197, 56, 147}, {176, 56, 146}, {155, 72, 182}, {165, 79, 205}, {255, 187, 1}, {246, 155, 1}, {245, 102, 6}, {255, 105, 0}, {246, 59, 0}, {250, 32, 1}, {247, 11, 0}, {235, 0, 4}, {233, 15, 31}, {227, 18, 48}, {219, 29, 76}, {207, 35, 94}, {211, 48, 127}, {187, 48, 124}, {166, 62, 163}, {179, 71, 185}, {249, 201, 1}, {249, 182, 1}, {234, 142, 20}, {247, 117, 1}, {255, 107, 0}, {255, 70, 0}, {255, 40, 0}, {255, 11, 2}, {255, 6, 15}, {255, 15, 40}, {247, 21, 57}, {236, 30, 78}, {212, 37, 97}, {187, 42, 110}, {181, 52, 136}, {180, 59, 154}, {245, 212, 4}, {255, 225, 0}, {247, 183, 3}, {236, 132, 18}, {252, 115, 4}, {249, 84, 1}, {244, 54, 1}, {246, 24, 0}, {246, 0, 1}, {242, 5, 19}, {234, 15, 41}, {229, 25, 68}, {202, 32, 78}, {203, 35, 94}, {219, 49, 129}, {183, 50, 129}, {245, 218, 18}, {247, 214, 2}, {255, 224, 0}, {247, 181, 1}, {244, 159, 2}, {247, 135, 5}, {244, 107, 2}, {246, 79, 2}, {244, 49, 2}, {246, 16, 0}, {246, 2, 5}, {235, 9, 24}, {227, 19, 52}, {243, 32, 83}, {206, 36, 95}, {196, 39, 107}, {0, 0, 0}, {245, 217, 18}, {250, 217, 4}, {249, 201, 1}, {255, 188, 2}, {255, 155, 1}, {255, 124, 1}, {255, 94, 1}, {255, 64, 1}, {255, 33, 1}, {255, 8, 3}, {255, 7, 19}, {238, 14, 38}, {228, 21, 57}, {205, 29, 58}, {0, 0, 0}}; +int upvote[256][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {31, 8, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {255, 68, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; +int sh[256][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {2, 2, 2}, {3, 3, 3}, {3, 3, 3}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {3, 3, 3}, {3, 3, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {22, 22, 22}, {58, 58, 58}, {78, 78, 78}, {86, 86, 86}, {69, 69, 69}, {5, 5, 5}, {1, 1, 1}, {3, 3, 3}, {0, 0, 0}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {86, 86, 86}, {154, 154, 154}, {114, 114, 114}, {73, 73, 73}, {49, 49, 49}, {40, 40, 40}, {39, 39, 39}, {6, 6, 6}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {93, 93, 93}, {163, 163, 163}, {118, 118, 118}, {65, 65, 65}, {17, 17, 17}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {14, 14, 14}, {52, 52, 52}, {0, 0, 0}, {35, 35, 35}, {0, 0, 0}, {2, 2, 2}, {3, 3, 3}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {30, 30, 30}, {74, 74, 74}, {114, 114, 114}, {122, 122, 122}, {54, 54, 54}, {0, 0, 0}, {21, 21, 21}, {211, 211, 211}, {4, 4, 4}, {174, 174, 174}, {48, 48, 48}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {3, 3, 3}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {32, 32, 32}, {131, 131, 131}, {108, 108, 108}, {0, 0, 0}, {183, 183, 183}, {38, 38, 38}, {136, 136, 136}, {130, 130, 130}, {41, 41, 41}, {75, 75, 75}, {78, 78, 78}, {0, 0, 0}, {0, 0, 0}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {20, 20, 20}, {51, 51, 51}, {199, 199, 199}, {152, 152, 152}, {199, 199, 199}, {116, 116, 116}, {110, 110, 110}, {193, 193, 193}, {51, 51, 51}, {46, 46, 46}, {25, 25, 25}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {61, 61, 61}, {154, 154, 154}, {123, 123, 123}, {76, 76, 76}, {53, 53, 53}, {173, 173, 173}, {155, 155, 155}, {123, 123, 123}, {0, 0, 0}, {181, 181, 181}, {4, 4, 4}, {0, 0, 0}, {0, 0, 0}, {2, 2, 2}, {0, 0, 0}, {49, 49, 49}, {209, 209, 209}, {32, 32, 32}, {0, 0, 0}, {0, 0, 0}, {117, 117, 117}, {126, 126, 126}, {53, 53, 53}, {135, 135, 135}, {1, 1, 1}, {134, 134, 134}, {63, 63, 63}, {2, 2, 2}, {3, 3, 3}, {1, 1, 1}, {1, 1, 1}, {24, 24, 24}, {124, 124, 124}, {87, 87, 87}, {75, 75, 75}, {126, 126, 126}, {143, 143, 143}, {11, 11, 11}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {53, 53, 53}, {126, 126, 126}, {0, 0, 0}, {3, 3, 3}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {25, 25, 25}, {35, 35, 35}, {24, 24, 24}, {0, 0, 0}, {0, 0, 0}, {2, 2, 2}, {3, 3, 3}, {0, 0, 0}, {0, 0, 0}, {35, 35, 35}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {2, 2, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {3, 3, 3}, {1, 1, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; + +int mario[256][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {112, 104, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {248, 171, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {248, 171, 0}, {112, 104, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {216, 0, 0}, {112, 104, 0}, {112, 104, 0}, {216, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {216, 0, 0}, {112, 104, 0}, {112, 104, 0}, {216, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {248, 171, 0}, {248, 171, 0}, {112, 104, 0}, {216, 0, 0}, {248, 171, 0}, {216, 0, 0}, {216, 0, 0}, {248, 171, 0}, {216, 0, 0}, {112, 104, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {248, 171, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {248, 171, 0}, {248, 171, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {248, 171, 0}, {248, 171, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {0, 0, 0}, {0, 0, 0}, {216, 0, 0}, {216, 0, 0}, {216, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {112, 104, 0}, {0, 0, 0}, {0, 0, 0}};