Minitel_ElectroCardio.ino 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Minitel library for Arduino (v0.1) / May 2013
  3. * http://github.com/01010101/Minitel
  4. *
  5. * By Jerome Saint-Clair aka 01010101
  6. * http://saint-clair.net
  7. *
  8. * For the Graffiti Research Lab France
  9. * http://graffitiresearchlab.fr
  10. *
  11. * Based on works by the Tetalab (Fabrice, Renaud, PG & Phil)
  12. * http://tetalab.org
  13. */
  14. #include <SoftwareSerial.h>
  15. #include <Minitel.h>
  16. Minitel m;
  17. int counter = 0;
  18. byte ccc = 36;
  19. char c[] = {ccc,11,ccc,11,ccc,11,ccc,11,ccc,10,ccc,10,ccc,10,ccc,ccc,10,ccc,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,ccc,11,8,7,10,10,9,ccc,10,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,ccc,10,8,9,ccc,10,ccc,ccc,11,ccc,11,ccc,11,ccc,11,ccc,ccc,ccc,11,ccc,11,ccc,ccc,ccc,10,ccc,10,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc,ccc};
  20. void setup() {
  21. }
  22. void loop() {
  23. m.clearScreen();
  24. m.graphicMode();
  25. m.moveCursorTo(1,18);
  26. for (int i=0; i<sizeof(c); i++) {
  27. m.textByte(c[i]);
  28. }
  29. delay(900);
  30. counter ++;
  31. if (counter == 20) {
  32. m.clearScreen();
  33. counter = 0;
  34. m.moveCursorTo(1,14);
  35. for (int i=0; i<40; i++) {
  36. m.textByte(ccc);
  37. }
  38. m.bip(1000);
  39. delay(5000);
  40. }
  41. }