Arduino et matrices de leds : un afficheur piloté depuis Internet

Je me décide enfin à documenter ce projet initié en 2011 alors que j’étais en expatriation aux USA. L’idée était de faire une « œuvre » connectée sur laquelle mes amis pourraient afficher le message de leur choix. Au final, le résultat n’a rien d’une « œuvre », mais caché par exemple dans un sapin pour faire un arbre de noël connecté, le truc fonctionne…

Le matériel:

Une carte Arduino-Compatible Mega 1280: http://arduino.cc/en/Main/ArduinoBoardMega

  • ATmega1280 Microcontroller
  • Bootloader installed, ready to upload sketches from Arduino software
  • Flash Memory 128 KB (32KB pour la uno standard)
  • EEPROM 4 KB

Une carte Arduino Uno suffirait pour ce projet (taille binaire du croquis : 22,9KB)

Une carte Ethernet W5100 Ethernet Shield V.6

(Supports micro SD card, PoE – Power-over-Ethernet Ready)

Arduino_web_matrix2

Carte Arduino Mega et Shield Ethernet

8 modules comprenant une matrice de 64 leds et un circuit Maxim7219

Pour la l’afficheur, après avoir créé un PCB pour assembler une matrice de led 8×8 et un circuit Maxim7219 (afin de piloter ces matrices avec un minimum de I/O) j ai découvert sur eBay des modules en kit à monter pour beaucoup moins cher : http://www.ebay.com/itm/MAX7219-Dot-Matrix-Module-MCU-Control-Display-Module-DIY-Kit-for-Arduino-/221443810162

kit_led_matrix1 kit_led_matrix2

2 LM 7805 (régulateur de tension 5V)

LM7805 7805Diagram2

Les matrices de LED sont consommatrices en courant et j’ai choisi de les alimenter en utilisant l’alimentation 9V de l’Arduino et en la régulant en 5V (plutôt que d utiliser la sortie 5V de l’Arduino qui ne peut délivrer tout le courant nécessaire)

Arduino_web_matrix3 Arduino_web_matrix

Le logiciel

(Derniere version disponible sur le Github des Fabriqueurs: https://github.com/les-fabriqueurs/Web-Scroll-Matrix )

[pastacode lang= »c » message= » » highlight= » » provider= »manual » manual= »%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Scroll%208%20Matrix%20-%20Web%20server%0A%2F%2F%20V2.0%20-%20pierre%40frabriqueurs.com%0A%2F%2F%0A%2F%2F%20Inspired%20by%20%22HTML%20to%20LCD%20Server%22%20v1.1%20from%20Everett%20Robinson%0A%2F%2F%0A%2F%2F%20%20Serveur%20Web%20permettant%20de%20faire%20defiler%20un%20message%20saisi%20depuis%20Inernet%0A%2F%2F%20%20sur%20un%20afficheur%20compos%C3%A9%20de%208%20matrices%20de%208×8%20LED%20(Module%20d’affichage%20MAX7219)%0A%2F%2F%0A%2F%2F%0A%2F%2F%20Matrices%20nb%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3A%208%20%0A%2F%2F%0A%2F%2F%20DIN%20pin%20of%20MAX7219%20module%20%3A%2022%0A%2F%2F%20CS%20%20pin%20of%20MAX7219%20module%20%3A%2024%0A%2F%2F%20CLK%20pin%20of%20MAX7219%20module%20%3A%2026%0A%2F%2F%20Buzzer%20%2B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3A%209%0A%2F%2F%20Buzzer%20-%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3A%20GND%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Inclusion%20des%20libraries%20necessaires%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%23include%20%3CMaxMatrix.h%3E%0A%23include%20%3CSPI.h%3E%0A%23include%20%3CEthernet.h%3E%0A%23include%20%3Cstring.h%3E%0A%23include%20%3Cavr%2Fpgmspace.h%3E%0A%20%20%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Parametres%20du%20serveur%20Web%20(adresse%20IP%2C%20adresse%20MAC%2C%20Passerelle%0A%2F%2F%20et%20masque%20sous%20reseau)%20%0A%2F%2F%20Ces%20parametres%20dependent%20de%20la%20configuration%20de%20votre%20reseau%20local%0A%2F%2F%0A%2F%2F%20Afin%20d’acceder%20au%20Server%20Web%20heberge%20par%20l’arduino%20depuis%0A%2F%2F%20Internet%2C%20il%20est%20necessaire%20d’activer%20le%20transfert%20d’adresse%20(NAT)%0A%2F%2F%20Sur%20la%20boxe%20Internet%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Abyte%20ip%5B%5D%20%3D%20%7B%20192%2C168%2C1%2C100%20%7D%3B%0Abyte%20mac%5B%5D%20%3D%20%7B%200×00%2C%200xAA%2C%200xBB%2C%200xCC%2C%200xDA%2C%200×02%20%7D%3B%0Abyte%20gateway%5B%5D%20%3D%20%7B%20192%2C168%2C1%2C254%20%7D%3B%0Abyte%20subnet%5B%5D%20%3D%20%7B%20255%2C%20255%2C%20255%2C0%20%7D%3B%0A%0A%2F%2F%20Definition%20d’une%20instance%20de%20Server%20Web%0AEthernetServer%20server(80)%3B%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Definition%20des%20variables%20de%20type%20%22chaine%20de%20carateres%22%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0AString%20line1%20%3D%20%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%3B%0AString%20line2%20%3D%20%22%20%20%20%20%20%20%20%20%20%20%22%3B%0Achar%20%20%20msg1%5B%5D%3D%20%22Yep%20yep%20yep%20!%20that’s%20rocks%20!%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%3B%0Achar%20%20%20msg2%5B%5D%3D%20%22%20%20Signe%3A%20%22%3B%0Achar%20%20%20msg3%5B%5D%3D%20%22%20%20%20%20%20%20%20%20%20%20%22%3B%0Achar%20%20%20msg4%5B%5D%3D%20%22%20%20…%20%20%22%3B%0A%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Tableau%20de%20caracteres%20stoquee%20en%20Flash%20%0A%2F%2F%20(afin%20de%20limiter%20l’utilisation%20de%20la%20RAM)%0A%2F%2F%20Ce%20tableau%20contient%20le%20codage%20permettant%20d%20allumer%20les%20pixels%20necessaire%0A%2F%2F%20a%20l’affichage%20d%20un%20caractere%20sur%20une%20matrice%20de%20Leds%20(une%20ligne%20par%20caracteres)%0A%2F%2F%0A%2F%2F%20%201er%20%20element%3A%20largeur%20du%20caractere%20en%20pixels%0A%2F%2F%20%202eme%20element%3A%20hauteur%20du%20caractere%20en%20pixels%0A%2F%2F%20%203-5eme%20element%3A%20Codage%20en%20binaire%20des%20pixels%20a%20allumer%20%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0APROGMEM%20prog_uchar%20CH%5B%5D%20%3D%20%7B%0A3%2C%208%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20space%0A1%2C%208%2C%20B01011111%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20!%0A3%2C%208%2C%20B00000011%2C%20B00000000%2C%20B00000011%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%22%0A5%2C%208%2C%20B00010100%2C%20B00111110%2C%20B00010100%2C%20B00111110%2C%20B00010100%2C%20%2F%2F%20%23%0A4%2C%208%2C%20B00100100%2C%20B01101010%2C%20B00101011%2C%20B00010010%2C%20B00000000%2C%20%2F%2F%20%24%0A5%2C%208%2C%20B01100011%2C%20B00010011%2C%20B00001000%2C%20B01100100%2C%20B01100011%2C%20%2F%2F%20%25%0A5%2C%208%2C%20B00110110%2C%20B01001001%2C%20B01010110%2C%20B00100000%2C%20B01010000%2C%20%2F%2F%20%26%0A1%2C%208%2C%20B00000011%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20’%0A3%2C%208%2C%20B00011100%2C%20B00100010%2C%20B01000001%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20(%0A3%2C%208%2C%20B01000001%2C%20B00100010%2C%20B00011100%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20)%0A5%2C%208%2C%20B00101000%2C%20B00011000%2C%20B00001110%2C%20B00011000%2C%20B00101000%2C%20%2F%2F%20*%0A5%2C%208%2C%20B00001000%2C%20B00001000%2C%20B00111110%2C%20B00001000%2C%20B00001000%2C%20%2F%2F%20%2B%0A2%2C%208%2C%20B10110000%2C%20B01110000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%2C%0A4%2C%208%2C%20B00001000%2C%20B00001000%2C%20B00001000%2C%20B00001000%2C%20B00000000%2C%20%2F%2F%20-%0A2%2C%208%2C%20B01100000%2C%20B01100000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20.%0A4%2C%208%2C%20B01100000%2C%20B00011000%2C%20B00000110%2C%20B00000001%2C%20B00000000%2C%20%2F%2F%20%2F%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B01000001%2C%20B00111110%2C%20B00000000%2C%20%2F%2F%200%0A3%2C%208%2C%20B01000010%2C%20B01111111%2C%20B01000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%201%0A4%2C%208%2C%20B01100010%2C%20B01010001%2C%20B01001001%2C%20B01000110%2C%20B00000000%2C%20%2F%2F%202%0A4%2C%208%2C%20B00100010%2C%20B01000001%2C%20B01001001%2C%20B00110110%2C%20B00000000%2C%20%2F%2F%203%0A4%2C%208%2C%20B00011000%2C%20B00010100%2C%20B00010010%2C%20B01111111%2C%20B00000000%2C%20%2F%2F%204%0A4%2C%208%2C%20B00100111%2C%20B01000101%2C%20B01000101%2C%20B00111001%2C%20B00000000%2C%20%2F%2F%205%0A4%2C%208%2C%20B00111110%2C%20B01001001%2C%20B01001001%2C%20B00110000%2C%20B00000000%2C%20%2F%2F%206%0A4%2C%208%2C%20B01100001%2C%20B00010001%2C%20B00001001%2C%20B00000111%2C%20B00000000%2C%20%2F%2F%207%0A4%2C%208%2C%20B00110110%2C%20B01001001%2C%20B01001001%2C%20B00110110%2C%20B00000000%2C%20%2F%2F%208%0A4%2C%208%2C%20B00000110%2C%20B01001001%2C%20B01001001%2C%20B00111110%2C%20B00000000%2C%20%2F%2F%209%0A2%2C%208%2C%20B01010000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%3A%0A2%2C%208%2C%20B10000000%2C%20B01010000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%3B%0A3%2C%208%2C%20B00010000%2C%20B00101000%2C%20B01000100%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%3C%203%2C%208%2C%20B00010100%2C%20B00010100%2C%20B00010100%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%3D%203%2C%208%2C%20B01000100%2C%20B00101000%2C%20B00010000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%3E%0A4%2C%208%2C%20B00000010%2C%20B01011001%2C%20B00001001%2C%20B00000110%2C%20B00000000%2C%20%2F%2F%20%3F%0A5%2C%208%2C%20B00111110%2C%20B01001001%2C%20B01010101%2C%20B01011101%2C%20B00001110%2C%20%2F%2F%20%40%0A4%2C%208%2C%20B01111110%2C%20B00010001%2C%20B00010001%2C%20B01111110%2C%20B00000000%2C%20%2F%2F%20A%0A4%2C%208%2C%20B01111111%2C%20B01001001%2C%20B01001001%2C%20B00110110%2C%20B00000000%2C%20%2F%2F%20B%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B01000001%2C%20B00100010%2C%20B00000000%2C%20%2F%2F%20C%0A4%2C%208%2C%20B01111111%2C%20B01000001%2C%20B01000001%2C%20B00111110%2C%20B00000000%2C%20%2F%2F%20D%0A4%2C%208%2C%20B01111111%2C%20B01001001%2C%20B01001001%2C%20B01000001%2C%20B00000000%2C%20%2F%2F%20E%0A4%2C%208%2C%20B01111111%2C%20B00001001%2C%20B00001001%2C%20B00000001%2C%20B00000000%2C%20%2F%2F%20F%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B01001001%2C%20B01111010%2C%20B00000000%2C%20%2F%2F%20G%0A4%2C%208%2C%20B01111111%2C%20B00001000%2C%20B00001000%2C%20B01111111%2C%20B00000000%2C%20%2F%2F%20H%0A3%2C%208%2C%20B01000001%2C%20B01111111%2C%20B01000001%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20I%0A4%2C%208%2C%20B00110000%2C%20B01000000%2C%20B01000001%2C%20B00111111%2C%20B00000000%2C%20%2F%2F%20J%0A4%2C%208%2C%20B01111111%2C%20B00001000%2C%20B00010100%2C%20B01100011%2C%20B00000000%2C%20%2F%2F%20K%0A4%2C%208%2C%20B01111111%2C%20B01000000%2C%20B01000000%2C%20B01000000%2C%20B00000000%2C%20%2F%2F%20L%0A5%2C%208%2C%20B01111111%2C%20B00000010%2C%20B00001100%2C%20B00000010%2C%20B01111111%2C%20%2F%2F%20M%0A5%2C%208%2C%20B01111111%2C%20B00000100%2C%20B00001000%2C%20B00010000%2C%20B01111111%2C%20%2F%2F%20N%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B01000001%2C%20B00111110%2C%20B00000000%2C%20%2F%2F%20O%0A4%2C%208%2C%20B01111111%2C%20B00001001%2C%20B00001001%2C%20B00000110%2C%20B00000000%2C%20%2F%2F%20P%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B01000001%2C%20B10111110%2C%20B00000000%2C%20%2F%2F%20Q%0A4%2C%208%2C%20B01111111%2C%20B00001001%2C%20B00001001%2C%20B01110110%2C%20B00000000%2C%20%2F%2F%20R%0A4%2C%208%2C%20B01000110%2C%20B01001001%2C%20B01001001%2C%20B00110010%2C%20B00000000%2C%20%2F%2F%20S%0A5%2C%208%2C%20B00000001%2C%20B00000001%2C%20B01111111%2C%20B00000001%2C%20B00000001%2C%20%2F%2F%20T%0A4%2C%208%2C%20B00111111%2C%20B01000000%2C%20B01000000%2C%20B00111111%2C%20B00000000%2C%20%2F%2F%20U%0A5%2C%208%2C%20B00001111%2C%20B00110000%2C%20B01000000%2C%20B00110000%2C%20B00001111%2C%20%2F%2F%20V%0A5%2C%208%2C%20B00111111%2C%20B01000000%2C%20B00111000%2C%20B01000000%2C%20B00111111%2C%20%2F%2F%20W%0A5%2C%208%2C%20B01100011%2C%20B00010100%2C%20B00001000%2C%20B00010100%2C%20B01100011%2C%20%2F%2F%20X%0A5%2C%208%2C%20B00000111%2C%20B00001000%2C%20B01110000%2C%20B00001000%2C%20B00000111%2C%20%2F%2F%20Y%0A4%2C%208%2C%20B01100001%2C%20B01010001%2C%20B01001001%2C%20B01000111%2C%20B00000000%2C%20%2F%2F%20Z%0A2%2C%208%2C%20B01111111%2C%20B01000001%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%5B%0A4%2C%208%2C%20B00000001%2C%20B00000110%2C%20B00011000%2C%20B01100000%2C%20B00000000%2C%20%2F%2F%20%5C%20backslash%0A2%2C%208%2C%20B01000001%2C%20B01111111%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%5D%0A3%2C%208%2C%20B00000010%2C%20B00000001%2C%20B00000010%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20hat%0A4%2C%208%2C%20B01000000%2C%20B01000000%2C%20B01000000%2C%20B01000000%2C%20B00000000%2C%20%2F%2F%20_%0A2%2C%208%2C%20B00000001%2C%20B00000010%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%60%0A4%2C%208%2C%20B00100000%2C%20B01010100%2C%20B01010100%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20a%0A4%2C%208%2C%20B01111111%2C%20B01000100%2C%20B01000100%2C%20B00111000%2C%20B00000000%2C%20%2F%2F%20b%0A4%2C%208%2C%20B00111000%2C%20B01000100%2C%20B01000100%2C%20B00101000%2C%20B00000000%2C%20%2F%2F%20c%0A4%2C%208%2C%20B00111000%2C%20B01000100%2C%20B01000100%2C%20B01111111%2C%20B00000000%2C%20%2F%2F%20d%0A4%2C%208%2C%20B00111000%2C%20B01010100%2C%20B01010100%2C%20B00011000%2C%20B00000000%2C%20%2F%2F%20e%0A3%2C%208%2C%20B00000100%2C%20B01111110%2C%20B00000101%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20f%0A4%2C%208%2C%20B10011000%2C%20B10100100%2C%20B10100100%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20g%0A4%2C%208%2C%20B01111111%2C%20B00000100%2C%20B00000100%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20h%0A3%2C%208%2C%20B01000100%2C%20B01111101%2C%20B01000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20i%0A4%2C%208%2C%20B01000000%2C%20B10000000%2C%20B10000100%2C%20B01111101%2C%20B00000000%2C%20%2F%2F%20j%0A4%2C%208%2C%20B01111111%2C%20B00010000%2C%20B00101000%2C%20B01000100%2C%20B00000000%2C%20%2F%2F%20k%0A3%2C%208%2C%20B01000001%2C%20B01111111%2C%20B01000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20l%0A5%2C%208%2C%20B01111100%2C%20B00000100%2C%20B01111100%2C%20B00000100%2C%20B01111000%2C%20%2F%2F%20m%0A4%2C%208%2C%20B01111100%2C%20B00000100%2C%20B00000100%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20n%0A4%2C%208%2C%20B00111000%2C%20B01000100%2C%20B01000100%2C%20B00111000%2C%20B00000000%2C%20%2F%2F%20o%0A4%2C%208%2C%20B11111100%2C%20B00100100%2C%20B00100100%2C%20B00011000%2C%20B00000000%2C%20%2F%2F%20p%0A4%2C%208%2C%20B00011000%2C%20B00100100%2C%20B00100100%2C%20B11111100%2C%20B00000000%2C%20%2F%2F%20q%0A4%2C%208%2C%20B01111100%2C%20B00001000%2C%20B00000100%2C%20B00000100%2C%20B00000000%2C%20%2F%2F%20r%0A4%2C%208%2C%20B01001000%2C%20B01010100%2C%20B01010100%2C%20B00100100%2C%20B00000000%2C%20%2F%2F%20s%0A3%2C%208%2C%20B00000100%2C%20B00111111%2C%20B01000100%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20t%0A4%2C%208%2C%20B00111100%2C%20B01000000%2C%20B01000000%2C%20B01111100%2C%20B00000000%2C%20%2F%2F%20u%0A5%2C%208%2C%20B00011100%2C%20B00100000%2C%20B01000000%2C%20B00100000%2C%20B00011100%2C%20%2F%2F%20v%0A5%2C%208%2C%20B00111100%2C%20B01000000%2C%20B00111100%2C%20B01000000%2C%20B00111100%2C%20%2F%2F%20w%0A5%2C%208%2C%20B01000100%2C%20B00101000%2C%20B00010000%2C%20B00101000%2C%20B01000100%2C%20%2F%2F%20x%0A4%2C%208%2C%20B10011100%2C%20B10100000%2C%20B10100000%2C%20B01111100%2C%20B00000000%2C%20%2F%2F%20y%0A3%2C%208%2C%20B01100100%2C%20B01010100%2C%20B01001100%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20z%0A3%2C%208%2C%20B00001000%2C%20B00110110%2C%20B01000001%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%7B%0A1%2C%208%2C%20B01111111%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%7C%0A3%2C%208%2C%20B01000001%2C%20B00110110%2C%20B00001000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%7D%0A4%2C%208%2C%20B00001000%2C%20B00000100%2C%20B00001000%2C%20B00000100%2C%20B00000000%2C%20%2F%2F%20~%0A1%2C%208%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20DEL%20(unused)%0A4%2C%208%2C%20B00111110%2C%20B01000001%2C%20B11000001%2C%20B00100010%2C%20B00000000%2C%20%2F%2F%20%C3%87%20%2096%0A4%2C%208%2C%20B00111100%2C%20B01000001%2C%20B01000000%2C%20B01111100%2C%20B00000000%2C%20%2F%2F%20%C3%BC%20%2097%0A4%2C%208%2C%20B00111000%2C%20B01010110%2C%20B01010101%2C%20B00011000%2C%20B00000000%2C%20%2F%2F%20%C3%A9%20%2098%0A4%2C%208%2C%20B00100000%2C%20B01010110%2C%20B01010101%2C%20B01111010%2C%20B00000000%2C%20%2F%2F%20%C3%A2%20%2099%0A4%2C%208%2C%20B00100000%2C%20B01010101%2C%20B01010100%2C%20B01111001%2C%20B00000000%2C%20%2F%2F%20%C3%A4%20%20100%0A4%2C%208%2C%20B00100000%2C%20B01010101%2C%20B01010110%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20%C3%A0%20%20101%0A4%2C%208%2C%20B00100000%2C%20B01010100%2C%20B01010100%2C%20B01111000%2C%20B00000000%2C%20%2F%2F%20%C3%A5%20%20102%0A4%2C%208%2C%20B00111010%2C%20B01010101%2C%20B01010101%2C%20B00011010%2C%20B00000000%2C%20%2F%2F%20%C3%AA%20%20103%0A4%2C%208%2C%20B00111000%2C%20B01010101%2C%20B01010100%2C%20B00011001%2C%20B00000000%2C%20%2F%2F%20%C3%AB%20%20104%0A4%2C%208%2C%20B00111000%2C%20B01010101%2C%20B01010110%2C%20B00011000%2C%20B00000000%2C%20%2F%2F%20%C3%A8%20%20105%0A3%2C%208%2C%20B01000101%2C%20B01111100%2C%20B01000001%2C%20B00000000%2C%20B00000000%2C%20%2F%2F%20%C3%AF%20%20106%0A3%2C%208%2C%20B01000110%2C%20B01111101%2C%20B01000010%2C%20B00000000%2C%20B00000000%20%20%2F%2F%20%C3%AE%20%20107%0A%7D%3B%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Declaration%20d’autres%20variables%20globales%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Aint%20data%20%3D%2022%3B%20%20%20%20%20%2F%2F%20Pin%20Arduino%20connecte%20a%20Pin%20DIN%20de%20la%20premiere%20martice%20de%20leds%0Aint%20load%20%3D%2024%3B%20%20%20%20%20%2F%2F%20Pin%20Arduino%20connecte%20a%20Pin%20CS%20des%20martices%20de%20leds%0Aint%20clock%20%3D%2026%3B%20%20%20%20%2F%2F%20Pin%20Arduino%20connecte%20a%20Pin%20CLK%20des%20martices%20de%20leds%0Aint%20maxInUse%20%3D%208%3B%20%20%2F%2F%20Nombre%20de%20matrices%20de%20Led%20utilisees%20%0A%0Aint%20buzzpin%20%3D%209%3B%20%20%20%20%2F%2F%20Pin%20Arduino%20connecte%20au%20buzzer%20%20(l’autre%20est%20connecte%20a%20la%20masse)%0Abyte%20buffer%5B10%5D%3B%0A%0A%2F%2F%20Instanciation%20d’un%20module%20MaxMatrix%20(utilise%20pour%20piloter%20les%20dites%20matrices)%0AMaxMatrix%20m(data%2C%20load%2C%20clock%2C%20maxInUse)%3B%20%2F%2F%20%0A%0A%0A%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Fonctions%20d%20affichage%20d’un%20texte%20deroulant%20sur%20les%20Matrices%0A%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20printCharWithShift(char%20c%2C%20int%20shift_speed)%7B%0A%20%20int%20char_indice%20%3D%200%3B%0A%20%20Serial.print(%22c1%20%3D%20%22)%3B%0A%20%20Serial.println(c)%3B%0A%20%20Serial.print(%22c1%20hexa%20%3D%20%22)%3B%20%0A%20%20Serial.println(c%2CHEX)%3B%0A%20%20%0A%2F%2F%20Switch%20pour%20gestion%20des%20caracteres%20accentu%C3%A9s%0A%20%20switch%20(c)%20%7B%0A%20%20%20%20case%200XFFFFFFC3%3A%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20case%200XFFFFFFA0%20%3A%0A%20%20%20%20%20%20%20char_indice%3D%20101%3B%20%2F%2F%20%C3%A0%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFA9%3A%0A%20%20%20%20%20%20%20%20char_indice%3D98%3B%20%2F%2F%20%C3%A9%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFA8%20%3A%0A%20%20%20%20%20%20%20%20char_indice%3D105%3B%20%2F%2F%20%C3%A8%0A%20%20%20%20%20%20break%3B%20%0A%20%20%20case%200XFFFFFFAA%3A%0A%20%20%20%20%20%20%20%20char_indice%3D103%3B%20%2F%2F%20%C3%AA%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFAB%20%3A%0A%20%20%20%20%20%20%20%20char_indice%3D104%3B%20%2F%2F%20%C3%AB%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFA4%20%3A%0A%20%20%20%20%20%20%20%20char_indice%3D100%3B%20%2F%2F%20%C3%A4%0A%20%20%20%20%20%20break%3B%20%0A%20%20%20case%200XFFFFFFAE%3A%0A%20%20%20%20%20%20%20%20char_indice%3D107%3B%20%2F%2F%20%C3%AE%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFA2%3A%0A%20%20%20%20%20%20%20%20char_indice%3D99%3B%20%2F%2F%20%C3%A2%0A%20%20%20%20%20%20break%3B%0A%20%20%20case%200XFFFFFFAF%3A%0A%20%20%20%20%20%20%20%20char_indice%3D106%3B%20%2F%2F%20%C3%AF%20%20%20%20%20%0A%20%20%7D%0A%20%20%20%20%0A%20%20if%20((c%20%3C%2032)%26%26(char_indice%20%3D%3D%200))%20return%3B%0A%20%20if%20((c%20%3C%20127)%26%26(char_indice%20%3D%3D%200))%20char_indice%20%3D%20c%20-%2032%3B%0A%20%0A%20%20memcpy_P(buffer%2C%20CH%20%2B%207*char_indice%2C%207)%3B%0A%20%20m.writeSprite(64%2C%200%2C%20buffer)%3B%0A%20%20m.setColumn(64%20%2B%20buffer%5B0%5D%2C%200)%3B%0A%20%20%0A%20%20for%20(int%20i%3D0%3B%20i%3Cbuffer%5B0%5D%2B1%3B%20i%2B%2B)%20%0A%20%20%7B%0A%20%20%20%20delay(shift_speed)%3B%0A%20%20%20%20m.shiftLeft(false%2C%20false)%3B%0A%20%20%7D%0A%7D%0A%0Avoid%20printStringWithShift(char*%20s%2C%20int%20shift_speed)%7B%0A%20%20while%20(*s%20!%3D%200)%7B%0A%20%20%20%20printCharWithShift(*s%2C%20shift_speed)%3B%0A%20%20%20%20s%2B%2B%3B%0A%20%20%7D%0A%7D%0A%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%20%20%20%20%20%20%20%20%20%20Fonction%20buzzer%20%20%20%20%20%20%20%20%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20buzz(int%20targetPin%2C%20long%20frequency%2C%20long%20length)%20%7B%0A%20%20long%20delayValue%20%3D%201000000%2Ffrequency%2F2%3B%0A%20%20long%20numCycles%20%3D%20frequency%20*%20length%2F%201000%3B%0A%20%20for%20(long%20i%3D0%3B%20i%20%3C%20numCycles%3B%20i%2B%2B)%20%7B%0A%20%20%20%20digitalWrite(targetPin%2CHIGH)%3B%0A%20%20%20%20delayMicroseconds(delayValue)%3B%0A%20%20%20%20digitalWrite(targetPin%2CLOW)%3B%0A%20%20%20%20delayMicroseconds(delayValue)%3B%0A%20%20%7D%0A%7D%0A%0A%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%20Code%20specifique%20au%20serveur%20Web%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%0A%2F%2F%20Affichage%20de%20l%20entete%20HTML%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20HtmlHeader(EthernetClient%20client)%20%7B%0A%20%20client.println(%22HTTP%2F1.1%20200%20OK%22)%3B%0A%20%20client.println(%22Content-Type%3A%20text%2Fhtml%3Bcharset%3DUTF-8%22)%3B%0A%20%20client.println(%22%22)%3B%0A%20%20client.println(%22%3CHTML%3E%5Cn%3CHEAD%3E%22)%3B%0A%20%20client.println(%22%3C%2FHEAD%3E%3CBODY%3E%22)%3B%0A%7D%0A%0A%2F%2F%20Affichage%20du%20pied%20de%20page%20de%20la%20page%20HTML%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20HtmlFooter(EthernetClient%20client)%20%7B%0A%20%20client.println(%22%3C%2FBODY%3E%3C%2FHTML%3E%22)%3B%0A%7D%0A%0A%2F%2F%20Cette%20fonction%20tranforme%2C%20les%20caracteres%20particulier%20que%20le%20HTML%20formate%20en%20%0A%2F%2F%20chaine%20non%20lisible%2C%20en%20caractere%20lisible%20%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20htmlToHuman(String%20URLstring)%20%7B%0A%20%20int%20indexOfDelim%20%3D%200%3B%20%20%2F%2FThis%20variable%20stores%20the%20location%20of%20our%20delimiter%20so%20we%20can%20find%20where%20line1%20ends%20and%20line2%20begins%0A%20%20%0A%20%20%2F%2F%20The%20following%20array%20stores%20a%20list%20of%20ugly%20html%20codes%2C%20and%20the%20special%20charaters%20they%20represent%20(for%20changing%20them%20back)%0A%20%20const%20String%20CHAR_CONVERSIONS%5B40%5D%5B2%5D%20%3D%20%7B%7B%22%2B%22%2C%22%20%22%7D%2C%7B%22%2540%22%2C%22%40%22%7D%2C%7B%22%2523%22%2C%22%23%22%7D%2C%7B%22%2524%22%2C%22%24%22%7D%2C%7B%22%252B%22%2C%22%2B%22%7D%2C%7B%22%2521%22%2C%22!%22%7D%2C%7B%22%257E%22%2C%22~%22%7D%2C%0A%20%20%7B%22%253A%22%2C%22%3A%22%7D%2C%7B%22%253B%22%2C%22%3B%22%7D%2C%7B%22%252C%22%2C%22%2C%22%7D%2C%7B%22%253F%22%2C%22%3F%22%7D%2C%7B%22%252F%22%2C%22%2F%22%7D%2C%7B%22%257C%22%2C%22%7C%22%7D%2C%7B%22%255E%22%2C%22%5E%22%7D%2C%0A%20%20%7B%22%255C%22%2C%22%5C%5C%22%7D%2C%7B%22%257B%22%2C%22%7B%22%7D%2C%7B%22%257D%22%2C%22%7D%22%7D%2C%7B%22%255B%22%2C%22%5B%22%7D%2C%7B%22%255D%22%2C%22%5D%22%7D%2C%7B%22%253C%22%2C%22%3C%22%7D%2C%7B%22%253E%22%2C%22%3E%22%7D%2C%0A%20%20%7B%22%2528%22%2C%22(%22%7D%2C%7B%22%2529%22%2C%22)%22%7D%2C%7B%22%2527%22%2C%22’%22%7D%2C%7B%22%2522%22%2C%22%5C%22%22%7D%2C%7B%22%253F%22%2C%22%3F%22%7D%2C%7B%22%2526%22%2C%22%26%22%7D%2C%7B%22%253D%22%2C%22%3D%22%7D%2C%0A%20%20%7B%22%2525%22%2C%22%25%22%7D%2C%7B%22%25C3%25A9%22%2C%22%C3%A9%22%7D%2C%7B%22%25C3%25A8%22%2C%22%C3%A8%22%7D%2C%7B%22%25C3%25AA%22%2C%22%C3%AA%22%7D%2C%7B%22%25C3%25A7%22%2C%22%C3%A7%22%7D%2C%7B%22%25C3%25A0%22%2C%22%C3%A0%22%7D%2C%0A%20%20%7B%22%2527%22%2C%22’%22%7D%2C%7B%22%25C3%25A4%22%2C%22%C3%A4%22%7D%2C%7B%22%25C3%25AB%22%2C%22%C3%AB%22%7D%2C%7B%22%25C3%25AE%22%2C%22%C3%AE%22%7D%2C%7B%22%25C3%25AF%22%2C%22%C3%AF%22%7D%2C%7B%22%25C3%25A2%22%2C%22%C3%A2%22%7D%7D%3B%0A%20%20%0A%20%20URLstring.replace(%22L1%3D%22%2C%22%22)%3B%20%20%20%20%20%2F%2F%20remove%20the%20unnecessary%20field%20variable%20names%0A%20%20URLstring.replace(%22%26L2%3D%22%2C%22%60%22)%3B%20%20%20%2F%2F%20and%20turn%20this%20one%20into%20our%20delimiter%20character%20%60%20(The%20one%20on%20the%20~%20key)%0A%20%20%0A%20%20%2F%2FA%20for%20loop%20that%20replaces%20all%20the%20html%20codes%20with%20the%20right%20symbols%0A%20%20for%20(int%20i%3D0%20%3B%20i%20%3C%2040%3B%20i%2B%2B)%20%7B%20URLstring.replace(CHAR_CONVERSIONS%5Bi%5D%5B0%5D%2CCHAR_CONVERSIONS%5Bi%5D%5B1%5D)%3B%20%7D%20indexOfDelim%20%3D%20URLstring.indexOf(%22%60%22)%3B%20%2F%2F%20find%20the%20index%20of%20that%20delimiter%20line1%20%3D%20URLstring.substring(0%2CindexOfDelim)%3B%20%2F%2F%20set%20line1%20and%20line%202%20using%20that%20knowledge%20line2%20%3D%20URLstring.substring(indexOfDelim%2B1%2CURLstring.length())%3B%20return%3B%20%7D%20%2F%2F%20Parse%20an%20HTTP%20request%20header%20one%20character%20at%20a%20time%2C%20seeking%20string%20variables%20(modified%20from%20Kevin%20Haw’s%20code)%20void%20ParseHttpHeader(EthernetClient%20%26client)%20%7B%20char%20c%3B%20int%20i%20%3D%200%3B%20%2F%2FAn%20integer%20use%20to%20limit%20the%20size%20of%20rawUrlText%20(prevents%20crashing%20due%20to%20running%20out%20of%20memory)%20String%20rawUrlText%20%3D%20%22%22%3B%20%2F%2F%20Skip%20through%20until%20we%20hit%20a%20question%20mark%20(first%20one)%20while((c%20%3D%20client.read())%20!%3D%20’%3F’%20%26%26%20client.available())%20%7B%20%2F%2F%20Debug%20-%20print%20data%20Serial.print(c)%3B%20%7D%20%2F%2F%20Are%20we%20here%20for%20a%20question%20mark%20or%20did%20we%20run%20out%20of%20data%3F%20if(client.available()%20%3E%202)%20%7B%20%20%0A%20%20%20%20%2F%2F%20Read%20the%20data%20and%20add%20it%20to%20our%20unmodified%20string%20rawURLText!%0A%20%20%20%20%2F%2F%20the%20incrementer%20limits%20the%20input%20to%20about%201%20line%20of%20plain%20text%20and%201%2F2%20line%20of%20symbols%2C%20more%20causes%20line2%20to%20truncate%0A%20%20%20%20while((c%20%3D%20client.read())%20!%3D%20’%20’%20%26%26%20client.available()%20%26%26%20i%20%3C%2070)%20%7B%0A%20%20%20%20%20%20rawUrlText%20%3D%20rawUrlText%20%2B%20c%3B%0A%20%20%20%20%20%20Serial.print(c)%3B%0A%20%20%20%20%20%20i%2B%2B%3B%0A%20%20%20%20%7D%0A%20%20%0A%20%20%20%20htmlToHuman(rawUrlText)%3B%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Make%20it%20readable%0A%20%20%0A%20%20%20%20%2F%2F%20Conv%20string%202%20char*%0A%20%20%20%20line1.toCharArray(msg1%2C50)%3B%0A%20%20%20%20line2.toCharArray(msg3%2C10)%3B%0A%20%20%20%20%0A%20%20%20%20buzz(buzzpin%2C%202500%2C%202000)%3B%20%2F%2F%20buzz%20%C3%A0%202500Hz%202%20sec%20%20%0A%20%20%7D%0A%20%20%0A%20%20return%3B%0A%7D%0A%0A%0A%0A%2F%2F%20Set%20up%20webserver%20functionality%20(from%20Kevin%20Haw)%0Avoid%20WebServerSetup()%20%7B%0A%20%20%20%20%20%20Ethernet.begin(mac%2C%20ip)%3B%0A%20%20%20%20%20%20server.begin()%3B%0A%7D%0A%0A%2F%2F%0A%2F%2F%20Web%20server%20loop%20(modified%20from%20Kevin%20Haw’s%20code)%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0A%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%0Avoid%20WebServerLoop()%20%7B%0A%20%20EthernetClient%20client%20%3D%20server.available()%3B%0A%20%20boolean%20bPendingHttpResponse%20%3D%20false%3B%20%2F%2F%20True%20when%20we’ve%20received%20a%20whole%20HTTP%20request%20and%20need%20to%20output%20the%20webpage%0A%20%20boolean%20bPreventSecondParse%20%3D%20false%3B%20%20%2F%2FStops%20a%20second%20successive%20run%20of%20parseHttpHeader()%2C%20this%20prevents%20some%20nasty%20bugs.%0A%0A%20%20if%20(client)%20%7B%0A%20%20%20%20%2F%2F%20Loop%20as%20long%20as%20there’s%20a%20connection%0A%20%20%20%20while%20(client.connected())%20%7B%0A%20%20%20%20%20%20%2F%2F%20Do%20we%20have%20pending%20data%20(an%20HTTP%20request)%20and%20is%20this%20the%20first%20parse%3F%0A%20%20%20%20%20%20if%20(client.available()%20%26%26%20!bPreventSecondParse)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Indicate%20we%20need%20to%20respond%20to%20the%20HTTP%20request%20as%20soon%20as%20we’re%20done%20processing%20it%0A%20%20%20%20%20%20%20%20bPendingHttpResponse%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20bPreventSecondParse%20%3D%20true%3B%0A%0A%20%20%20%20%20%20%20%20ParseHttpHeader(client)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20There’s%20no%20data%20waiting%20to%20be%20read%20in%20on%20the%20client%20socket.%20%20Do%20we%20have%20a%20pending%20HTTP%20request%3F%0A%20%20%20%20%20%20%20%20if(bPendingHttpResponse)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Yes%2C%20we%20have%20a%20pending%20request.%20%20Clear%20the%20flag%20and%20then%20send%20the%20webpage%20to%20the%20client%0A%20%20%20%20%20%20%20%20%20%20bPendingHttpResponse%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20bPreventSecondParse%20%3D%20false%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20send%20a%20standard%20http%20response%20header%20and%20HTML%20header%0A%20%20%20%20%20%20%20%20%20%20HtmlHeader(client)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%0A%0A%3Cbr%20%2F%3E%0A%3CH2%3ELa%20Matrice%20LED%20Arduino%20du%20Salon%3A%3C%2FH2%3E%0A%3Cp%3E%0A%0A%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%3Cb%3ETexte%20affich%C3%A9%3A%3C%2Fb%3E%20%22%20%2B%20line1%20%2B%20%22%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%3Cb%3ESign%C3%A9%3A%3C%2Fb%3E%20%22%20%2B%20line2%20%2B%20%22%0A%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%0A%0A%3Cbr%20%2F%3E%0A%3CH2%3EAfficher%20autre%20chose!%3C%2FH2%3E%0A%3Cp%3E%0A%0A%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%0A%0A%3Cbr%20%2F%3E%0A%3Cform%20action%3D%5C%22%2F%3F%5C%22%20method%3Dget%3E%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%3Cb%3EMessage%3A%20%3C%2Fb%3E%3Cinput%20type%3D%5C%22text%5C%22%20name%3D%5C%22L1%5C%22%20maxlength%3D%5C%2250%5C%22%20size%3D%5C%2250%5C%22%20%2F%3E%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%3Cb%3EFrom%3A%20%3C%2Fb%3E%3Cinput%20type%3D%5C%22text%5C%22%20name%3D%5C%22L2%5C%22%20maxlength%3D%5C%2210%5C%22%20size%3D%5C%2210%5C%22%20%2F%3E%0A%22)%3B%0A%20%20%20%20%20%20%20%20%20%20client.println(%22%3Cinput%20type%3D%5C%22submit%5C%22%20value%3D%5C%22Submit%5C%22%20%2F%3E%3C%2Fform%3E%0A%3Cp%3E%0A%0A%0A%22)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20send%20HTML%20footer%0A%20%20%20%20%20%20%20%20%20%20HtmlFooter(client)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20give%20the%20web%20browser%20time%20to%20receive%20the%20data%0A%20%20%20%20%20%20%20%20%20%20delay(1)%3B%0A%20%20%20%20%20%20%20%20%20%20client.stop()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%20%20%2F%2F%20End%20while(connected)%0A%20%20%7D%0A%7D%0A%0A%0A%2F%2F————————————————————-%0A%2F%2F—-%20Main%20—————————————————%0A%2F%2F————————————————————-%0A%2F%2F————————————————————-%0A%0Avoid%20setup()%7B%20%20%0A%20%20%2F%2F%20declare%20pin%209%20to%20be%20an%20output%20for%20Buzzer%3A%0A%20%20pinMode(buzzpin%2C%20OUTPUT)%3B%0A%20%20%0A%20%20%2F%2F%20open%20the%20serial%20port%20at%209600%20bps%3A%0A%20%20Serial.begin(9600)%3B%0A%20%20%0A%20%20%2F%2F%20Web%20server%20init%0A%20%20WebServerSetup()%3B%0A%20%20%0A%20%20%2F%2F%20Matrix%20init%0A%20%20m.init()%3B%20%2F%2F%20module%20initialize%0A%20%20m.setIntensity(7)%3B%20%2F%2F%20dot%20matix%20intensity%200-15%0A%7D%0A%0A%0Avoid%20loop()%7B%20%20%0A%0A%20%20WebServerLoop()%3B%0A%20%20%0A%20%20%2F%2F%20print%20the%20active%20sentences%20on%20Matrix%0A%20%20printStringWithShift(msg1%2C%20100)%3B%0A%20%20printStringWithShift(msg2%2C%20100)%3B%0A%20%20printStringWithShift(msg3%2C%20100)%3B%0A%20%20printStringWithShift(msg4%2C%20100)%3B%20%20%20%20%20%20%0A%7D%0A »/]

 

PageWeb

Page Web affichée par le Serveur hébergé par l’Arduino

Et le boitier imprimé en 3D

Un peu d’indulgence sur le design, ce fut mon TP d’apprentissage de la modélisation 3D avec FreeCAD il y a presque 2 ans maintenant

Arduino_led_matrice1

Bien planqué dans un Sapin de Noël, ca passe…

IMG_20141221_101515

Evolutions du projet: forum des fabriqueurs

Posted in arduino, Projet en cours.

7 Comments

  1. Hello

    I am lawrence working at WIZnet which designed W5100 in Arduino Ethernet Shield.
    It is so interesting!
    And I really want to share it on WIZnet museum for other researchers and makers.
    If you do not mind, could I share this project ?
    here’s museum link : http://wiznetmuseum.com/

    Thank you

  2. Bonjour,
    J’ai du mal à compiler. Où est ce que je peux trouver MaxMatrix.h?
    Félicitation pour ce travail et merci d’avance,

    Gérard.

  3. Bonjour,
    Je crois que je me suis mal exprimé l’autre jour, la compilation ne fonctionnait pas suite à des erreurs. J’ai trouvé MaxMatrix.h et .cpp, du coup, c’est plus facile.
    J’ai modifié « PROGMEM prog_uchar CH[] » = par « const unsigned char CH[] PROGMEM = » et supprimé tout ce qui concerne le serveur. Mon objectif étant de faire défiler du texte sur des matrices.
    Demain je pars en vacances et je vais réfléchir à ce problème sur la plage.

    Merci pour ton aide,

    Gérard

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *