enviar desde una pagina web un mensaje a una matriz LED 8x8 que se desplaza de izquierda a derecha atraves de un IC MAX7219
materiales a utilizar
placa Arduino uno o Arduino mega
matriz LED 8X8
cables varios
montaje

codigo arduino
pin 12 = DataIn:din
pin 11 = CLK
pin 10 = : cs
//laboratorio #11 : Enviar desde una página web un mensaje a una matriz LED 8x8 (desplazándose de izquierda a derecha) a través de IC MAX7219.
*/
LedControl lc = LedControl(12,11,10);
//ASCII TABLE
byte chars[129][8] = {
{0,0,0,0,0,0,0,0}, // 0
{0,0,0,0,0,0,0,0}, // 1
{0,0,0,0,0,0,0,0}, // 2
{0,0,0,0,0,0,0,0}, // 3
{0,0,0,0,0,0,0,0}, // 4
{0,0,0,0,0,0,0,0}, // 5
{0,0,0,0,0,0,0,0}, // 6
{0,0,0,0,0,0,0,0}, // 7
{0,0,0,0,0,0,0,0}, // 8
{0,0,0,0,0,0,0,0}, // 9
{0,0,0,0,0,0,0,0}, // 10
{0,0,0,0,0,0,0,0}, // 11
{0,0,0,0,0,0,0,0}, // 12
{0,0,0,0,0,0,0,0}, // 13
{0,0,0,0,0,0,0,0}, // 14
{0,0,0,0,0,0,0,0}, // 15
{0,0,0,0,0,0,0,0}, // 16
{0,0,0,0,0,0,0,0}, // 17
{0,0,0,0,0,0,0,0}, // 18
{0,0,0,0,0,0,0,0}, // 19
{0,0,0,0,0,0,0,0}, // 20
{0,0,0,0,0,0,0,0}, // 21
{0,0,0,0,0,0,0,0}, // 22
{0,0,0,0,0,0,0,0}, // 23
{0,0,0,0,0,0,0,0}, // 24
{0,0,0,0,0,0,0,0}, // 25
{0,0,0,0,0,0,0,0}, // 26
{0,0,0,0,0,0,0,0}, // 27
{0,0,0,0,0,0,0,0}, // 28
{0,0,0,0,0,0,0,0}, // 29
{0,0,0,0,0,0,0,0}, // 30
{0,0,0,0,0,0,0,0}, // 31
{0,0,0,0,0,0,0,0}, // 32
{0,0,0,0,0,0,0,0}, // 33
{0,0,0,0,0,0,0,0}, // 34
{0,0,0,0,0,0,0,0}, // 35
{0,0,0,0,0,0,0,0}, // 36
{0,0,0,0,0,0,0,0}, // 37
{0,0,0,0,0,0,0,0}, // 38
{0,0,0,0,0,0,0,0}, // 39
{0,0,0,0,0,0,0,0}, // 40
{0,0,0,0,0,0,0,0}, // 41
{0,0,0,0,0,0,0,0}, // 42
{0,0,0,0,0,0,0,0}, // 43
{0,0,0,0,0,0,0,0}, // 44
{0,0,0,0,0,0,0,0}, // 45
{0,0,0,0,0,0,0,0}, // 46
{0,0,0,0,0,0,0,0}, // 47
{0,0,0,0,0,0,0,0}, // 48
{0,0,0,0,0,0,0,0}, // 49
{0,0,0,0,0,0,0,0}, // 50
{0,0,0,0,0,0,0,0}, // 51
{0,0,0,0,0,0,0,0}, // 52
{0,0,0,0,0,0,0,0}, // 53
{0,0,0,0,0,0,0,0}, // 54
{0,0,0,0,0,0,0,0}, // 55
{0,0,0,0,0,0,0,0}, // 56
{0,0,0,0,0,0,0,0}, // 57
{0,0,0,0,0,0,0,0}, // 58
{0,0,0,0,0,0,0,0}, // 59
{0,0,0,0,0,0,0,0}, // 60
{0,0,0,0,0,0,0,0}, // 61
{0,0,0,0,0,0,0,0}, // 62
{0,0,0,0,0,0,0,0}, // 63
{0,0,0,0,0,0,0,0}, // 64
{B11110110,B11111111,B00001001,B00001001,B00001001,B00001001,B11111111,B11110110}, // 65A
{B11111111,B11111111,B10001001,B10001001,B10001001,B10001001,B11111111,B01110110}, // 66B
{B11111111,B11111111,B11100111,B11000011,B11000011,B11000011,B11000011,B11000011}, // 67C
{B11111111,B11111111,B11000011,B11000011,B11000011,B11000011,B11111111,B01111110}, // 68D
{B01111110,B11111111,B11011011,B11011011,B11011011,B11000011,B11000011,B00000000},//E
{B11111110,B11111111,B00110011,B00110011,B00110011,B00110011,B00110011,B00000000},//F
{B11111110,B11111111,B10000011,B10011011,B10011011,B10011011,B10011011,B11110011},//G
{B11111111,B11111111,B00011000,B00011000,B00011000,B00011000,B11111111,B11111111},//H
{B11000011,B11000011,B11000011,B11111111,B11111111,B11000011,B11000011,B11000011},//I
{B11000011,B11000011,B11000011,B11111111,B11111111,B00000011,B00000011,B00000011},//J
{B11111111,B11111111,B00011000,B00011000,B00111100,B01100110,B11000011,B10000001},//K
{B11111111,B11111111,B11100000,B11000000,B11000000,B11000000,B11000000,B00000000},//L
{B11111111,B11111111,B00000110,B00011100,B00011100,B00000110,B11111111,B11111111},//M
{B11111111,B11111111,B00000110,B00001100,B00011000,B00110000,B11111111,B11111111},//N
{B01111110,B11111111,B11000011,B10000001,B10000001,B11000011,B11111111,B01111110},//O
{B11111110,B11111111,B00011111,B00010001,B00010001,B00011111,B00011111,B00000000},//P
{B00111110,B01111111,B01000001,B01000001,B01010001,B01100001,B01111111,B10111110},//Q
{B11111110,B11111111,B00011001,B00011001,B00011001,B00111001,B11011111,B10001110},//R
{B11001110,B11011111,B11011011,B11011011,B11011011,B11011011,B11111011,B01110011}, // 83S
{B00000011,B00000011,B00000011,B11111111,B11111111,B00000011,B00000011,B00000011}, // 84T
{B11111111,B11111111,B11000000,B11000000,B11000000,B11000000,B11111111,B11111111}, // 85U
{B00011111,B00111100,B01110000,B11100000,B11100000,B01110000,B00111100,B00011111},//V
{B00111110,B01111000,B11110000,B00111000,B00111000,B11110000,B01111000,B00111110},//W
{B10000001,B11000011,B01100110,B00011000,B00011000,B01100110,B11000011,B10000001},//X
{B00000001,B00000111,B00001100,B11111000,B11111000,B00001100,B00000111,B00000001},//Y
{B11000001,B11100001,B11110001,B10111001,B10011101,B10001111,B10000111,B10000011},//Z
{0,0,0,0,0,0,0,0}, // 91
{0,0,0,0,0,0,0,0}, // 92
{0,0,0,0,0,0,0,0}, // 93
{0,0,0,0,0,0,0,0}, // 94
{0,0,0,0,0,0,0,0}, // 95
{0,0,0,0,0,0,0,0}, // 96
{B11110110,B11111111,B00001001,B00001001,B00001001,B00001001,B11111111,B11110110}, // 65A
{B11111111,B11111111,B10001001,B10001001,B10001001,B10001001,B11111111,B01110110}, // 66B
{B11111111,B11111111,B11100111,B11000011,B11000011,B11000011,B11000011,B11000011}, // 67C
{B11111111,B11111111,B11000011,B11000011,B11000011,B11000011,B11111111,B01111110}, // 68D
{B01111110,B11111111,B11011011,B11011011,B11011011,B11000011,B11000011,B00000000},//E
{B11111110,B11111111,B00110011,B00110011,B00110011,B00110011,B00110011,B00000000},//F
{B11111110,B11111111,B10000011,B10011011,B10011011,B10011011,B10011011,B11110011},//G
{B11111111,B11111111,B00011000,B00011000,B00011000,B00011000,B11111111,B11111111},//H
{B11000011,B11000011,B11000011,B11111111,B11111111,B11000011,B11000011,B11000011},//I
{B11000011,B11000011,B11000011,B11111111,B11111111,B00000011,B00000011,B00000011},//J
{B11111111,B11111111,B00011000,B00011000,B00111100,B01100110,B11000011,B10000001},//K
{B11111111,B11111111,B11100000,B11000000,B11000000,B11000000,B11000000,B00000000},//L
{B11111111,B11111111,B00000110,B00011100,B00011100,B00000110,B11111111,B11111111},//M
{B11111111,B11111111,B00000110,B00001100,B00011000,B00110000,B11111111,B11111111},//N
{B01111110,B11111111,B11000011,B10000001,B10000001,B11000011,B11111111,B01111110},//O
{B11111110,B11111111,B00011111,B00010001,B00010001,B00011111,B00011111,B00000000},//P
{B00111110,B01111111,B01000001,B01000001,B01010001,B01100001,B01111111,B10111110},//Q
{B11111110,B11111111,B00011001,B00011001,B00011001,B00111001,B11011111,B10001110},//R
{B11001110,B11011111,B11011011,B11011011,B11011011,B11011011,B11111011,B01110011}, // 83S
{B00000011,B00000011,B00000011,B11111111,B11111111,B00000011,B00000011,B00000011}, // 84T
{B11111111,B11111111,B11000000,B11000000,B11000000,B11000000,B11111111,B11111111}, // 85U
{B00011111,B00111100,B01110000,B11100000,B11100000,B01110000,B00111100,B00011111},//V
{B00111110,B01111000,B11110000,B00111000,B00111000,B11110000,B01111000,B00111110},//W
{B10000001,B11000011,B01100110,B00011000,B00011000,B01100110,B11000011,B10000001},//X
{B00000001,B00000111,B00001100,B11111000,B11111000,B00001100,B00000111,B00000001},//Y
{B11000001,B11100001,B11110001,B10111001,B10011101,B10001111,B10000111,B10000011},//Z
{0,0,0,0,0,0,0,0}, // 123
{0,0,0,0,0,0,0,0}, // 124
{0,0,0,0,0,0,0,0}, // 125
{0,0,0,0,0,0,0,0}, // 126
{0,0,0,0,0,0,0,0}, // 127
{0,0,0,0,0,0,0,0} // 128
};
/* siempre esperamos un poco entre las actualizaciones de la pantalla */
void setup() {
/*
El MAX72XX está en modo de ahorro de energía en el arranque,
tenemos que hacer una llamada de atención
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
Serial.begin(9600);
}
/*
Este método mostrará los caracteres para la
palabra "Arduino" uno tras otro en la matriz.
(se necesitan al menos leds 5x7 para ver todo el caracteres)
*/
void writeChar(char chLetter, int nuDelayTime) {
for (int i=0; i<8; i++){
lc.setRow(0,i,chars[chLetter][i]);
}
delay(nuDelayTime);
}
void loop() {
Serial.flush();
if (Serial.available() > 0) {
char chLetter = Serial.read();
writeChar(chLetter,700);
}
}
video del laboratorio