#include int DIN = 13; int CS = 12; int CLK = 11; byte A[] = {B00000000, B00111100, B01100110, B01100110, B01111110, B01100110, B01100110, B01100110}; byte B[] = {B01111000, B01001000, B01001000, B01110000, B01001000, B01000100, B01000100, B01111100}; byte C[] = {B00000000, B00011110, B00100000, B01000000, B01000000, B01000000, B00100000, B00011110}; byte D[] = {B00000000, B00111000, B00100100, B00100010, B00100010, B00100100, B00111000, B00000000}; byte E[] = {B00000000, B00111100, B00100000, B00111000, B00100000, B00100000, B00111100, B00000000}; byte F[] = {B00000000, B00111100, B00100000, B00111000, B00100000, B00100000, B00100000, B00000000}; byte G[] = {B00000000, B00111110, B00100000, B00100000, B00101110, B00100010, B00111110, B00000000}; byte H[] = {B00000000, B00100100, B00100100, B00111100, B00100100, B00100100, B00100100, B00000000}; byte I[] = {B00000000, B00111000, B00010000, B00010000, B00010000, B00010000, B00111000, B00000000}; byte J[] = {B00000000, B00011100, B00001000, B00001000, B00001000, B00101000, B00111000, B00000000}; byte K[] = {B00000000, B00100100, B00101000, B00110000, B00101000, B00100100, B00100100, B00000000}; byte L[] = {B00000000, B00100000, B00100000, B00100000, B00100000, B00100000, B00111100, B00000000}; byte M[] = {B00000000, B00000000, B01000100, B10101010, B10010010, B10000010, B10000010, B00000000}; byte N[] = {B00000000, B00100010, B00110010, B00101010, B00100110, B00100010, B00000000, B00000000}; byte O[] = {B00000000, B00111100, B01000010, B01000010, B01000010, B01000010, B00111100, B00000000}; byte P[] = {B00000000, B00111000, B00100100, B00100100, B00111000, B00100000, B00100000, B00000000}; byte Q[] = {B00000000, B00111100, B01000010, B01000010, B01000010, B01000110, B00111110, B00000001}; byte R[] = {B00000000, B00111000, B00100100, B00100100, B00111000, B00100100, B00100100, B00000000}; byte S[] = {B00000000, B00111100, B00100000, B00111100, B00000100, B00000100, B00111100, B00000000}; byte T[] = {B00000000, B01111100, B00010000, B00010000, B00010000, B00010000, B00010000, B00000000}; byte U[] = {B00000000, B01000010, B01000010, B01000010, B01000010, B00100100, B00011000, B00000000}; byte V[] = {B00000000, B00100010, B00100010, B00100010, B00010100, B00010100, B00001000, B00000000}; byte W[] = {B00000000, B10000010, B10010010, B01010100, B01010100, B00101000, B00000000, B00000000}; byte X[] = {B00000000, B01000010, B00100100, B00011000, B00011000, B00100100, B01000010, B00000000}; byte Y[] = {B00000000, B01000100, B00101000, B00010000, B00010000, B00010000, B00010000, B00000000}; byte Z[] = {B00000000, B00111100, B00000100, B00001000, B00010000, B00100000, B00111100, B00000000}; byte RND[] = {B11111111,B11100111,B11000011,B10000001,B10000001,B11000011,B11100111,B11111111}; LedControl lc = LedControl(DIN, CLK, CS, 1); void setup() { lc.shutdown(0, false); lc.setIntensity(0, 5); lc.clearDisplay(0); Serial.begin(9600); } void loop() { if (Serial.available() > 0) { char comdata = char(Serial.read()); if (comdata == 'A') { printByte(A); delay(2000); } else if (comdata == 'B') { printByte(B); delay(2000); } else if (comdata == 'C') { printByte(C); delay(2000); } else if (comdata == 'D') { printByte(D); delay(2000); } else if (comdata == 'E') { printByte(E); delay(2000); } else if (comdata == 'F') { printByte(F); delay(2000); } else if (comdata == 'G') { printByte(G); delay(2000); } else if (comdata == 'H') { printByte(H); delay(2000); } else if (comdata == 'I') { printByte(I); delay(2000); } else if (comdata == 'J') { printByte(J); delay(2000); } else if (comdata == 'K') { printByte(K); delay(2000); } else if (comdata == 'L') { printByte(L); delay(2000); } else if (comdata == 'M') { printByte(M); delay(2000); } else if (comdata == 'N') { printByte(N); delay(2000); } else if (comdata == 'O') { printByte(O); delay(2000); } else if (comdata == 'P') { printByte(P); delay(2000); } else if (comdata == 'Q') { printByte(Q); delay(2000); } else if (comdata == 'R') { printByte(R); delay(2000); } else if (comdata == 'S') { printByte(S); delay(2000); } else if (comdata == 'T') { printByte(T); delay(2000); } else if (comdata == 'U') { printByte(U); delay(2000); } else if (comdata == 'V') { printByte(V); delay(2000); } else if (comdata == 'W') { printByte(W); delay(2000); } else if (comdata == 'X') { printByte(X); delay(2000); } else if (comdata == 'Y') { printByte(Y); delay(2000); } else if (comdata == 'Z') { printByte(Z); delay(2000); } else { printByte(RND); delay(2000); } } } void printByte(byte character []) { int i = 0; for (i = 0; i < 8; i++) { lc.setRow(0, i, character[i]); } }