MinitelULLA.ino 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. void setup() {
  18. }
  19. void loop() {
  20. m.clearScreen();
  21. m.pixelate();
  22. m.textMode();
  23. int x = 9;
  24. // U
  25. for (int i=5; i<9; i++) {
  26. m.textByte(123, x, i);
  27. m.textByte(123, x+2, i);
  28. }
  29. m.textChar('\\', x, 9);
  30. m.textChar('_', x+1, 9);
  31. m.textByte(123, x+2, 9);
  32. // ll
  33. for (int i=1; i<10; i++) {
  34. m.textByte(123, x+4, i);
  35. m.textByte(123, x+6, i);
  36. }
  37. // A
  38. m.textChar('/', x+8, 5);
  39. m.textChar('_', x+9, 4);
  40. m.textByte(123, x+10, 5);
  41. for (int i=6; i<9; i++) {
  42. m.textByte(123, x+8, i);
  43. m.textByte(123, x+10, i);
  44. }
  45. m.textChar('\\', x+8, 9);
  46. m.textChar('_', x+9, 9);
  47. m.textChar('\\', x+10, 9);
  48. m.text("MESSAGERIE AMICALE", 22, 2);
  49. m.text("ET CONVIVIALE", 22, 3);
  50. m.textChar('/', x+4, 10);
  51. m.textChar('/', x+3, 11);
  52. m.textChar('/', x+2, 12);
  53. m.textChar('\\', x+5, 10);
  54. m.textChar('\\', x+6, 11);
  55. m.textChar('\\', x+7, 12);
  56. m.graphicMode();
  57. m.textColor(RED);
  58. m.textByte(112, 1, 12);
  59. m.repeat(9);
  60. m.textByte(112, 17, 12);
  61. m.repeat(3);
  62. m.textByte(112, 34, 12);
  63. m.repeat(6);
  64. m.textMode();
  65. // Line -6
  66. m.textColor(RED);
  67. m.textChar('_', 28, 7);
  68. m.textChar('_');
  69. // Line -5
  70. m.textByte(123, 28, 8);
  71. m.textColor(WHITE);
  72. m.textChar('\\', 30, 8);
  73. // Line -4
  74. m.textChar('/', 27, 9);
  75. m.textColor(RED);
  76. m.textChar('\\', 31, 9);
  77. m.textColor(WHITE);
  78. // Line -3 (10)
  79. m.textChar('/', 23, 10);
  80. m.textColor(RED);
  81. m.textByte(126);
  82. m.repeat(2);
  83. m.textChar('_', 27, 10);
  84. m.textChar('\\', 32, 10);
  85. m.textColor(WHITE);
  86. // Line -2 (11)
  87. m.textChar('/', 22, 11);
  88. m.graphicMode();
  89. // Line 1
  90. m.textByte(127, 1, 13);
  91. m.repeat(8);
  92. m.textByte(39, 10, 13);
  93. m.textByte(9);
  94. m.textByte(9);
  95. m.textByte(96);
  96. m.textByte(9);
  97. m.textByte(9);
  98. m.textByte(9);
  99. m.textByte(43);
  100. m.textByte(127);
  101. m.textByte(127);
  102. m.textByte(39);
  103. m.textByte(106, 29, 13);
  104. m.textByte(48);
  105. m.textByte(32);
  106. m.textByte(112);
  107. m.textByte(126);
  108. m.textByte(127, 34, 13);
  109. m.repeat(6);
  110. // Line 2
  111. m.textByte(127, 1, 14);
  112. m.repeat(7);
  113. m.textByte(39, 9, 14);
  114. m.textByte(9);
  115. m.textByte(9);
  116. m.textByte(120);
  117. m.textByte(127);
  118. m.textByte(116);
  119. // m.textByte(48);
  120. m.textByte(112, 26, 14);
  121. m.textByte(52);
  122. m.textByte(106, 29, 14);
  123. m.textByte(127);
  124. m.repeat(10);
  125. /*
  126. m.textByte(32);
  127. m.textByte(112);
  128. m.textByte(126);
  129. m.textByte(127);
  130. m.repeat(8);
  131. */
  132. // Line 3
  133. m.textByte(47, 1, 15);
  134. m.textByte(39);
  135. m.textByte(35);
  136. m.textByte(35);
  137. m.textByte(9);
  138. m.textByte(35);
  139. m.textByte(9);
  140. m.textMode();
  141. m.textColor(RED);
  142. m.textChar('/');
  143. m.textByte(32);
  144. m.repeat(5);
  145. m.textChar('\\');
  146. m.graphicMode();
  147. m.textColor(WHITE);
  148. m.textByte(96, 23, 15);
  149. m.textByte(124);
  150. m.textByte(127);
  151. m.textByte(127);
  152. m.textByte(37);
  153. m.graphicMode();
  154. m.textColor(WHITE);
  155. m.textByte(106, 29, 15);
  156. m.textByte(127);
  157. m.repeat(10);
  158. // Line 4
  159. m.textMode();
  160. m.textColor(WHITE);
  161. m.textChar('_', 23, 16);
  162. m.textChar('_', 24, 16);
  163. m.textColor(RED); // bras
  164. m.textChar('_', 25, 16);
  165. m.textChar('_', 26, 16);
  166. m.graphicMode();
  167. m.textColor(WHITE);
  168. m.textByte(106, 29, 16);
  169. m.textByte(127);
  170. m.repeat(10);
  171. // Line 5
  172. m.textColor(RED);
  173. m.textByte(127, 1, 17);
  174. m.textByte(127);
  175. m.textByte(116);
  176. m.textByte(112);
  177. m.textByte(112);
  178. m.textByte(32);
  179. m.textByte(32);
  180. m.textByte(112);
  181. m.textByte(112);
  182. m.textByte(124);
  183. m.repeat(3);
  184. m.textByte(112);
  185. m.repeat(2);
  186. m.textByte(32);
  187. m.repeat(2);
  188. m.textColor(WHITE);
  189. m.textByte(122, 29, 17);
  190. m.textByte(127);
  191. m.repeat(10);
  192. // Line 6
  193. m.textColor(RED);
  194. m.textByte(127, 1, 18);
  195. m.repeat(15);
  196. m.textByte(125);
  197. m.textByte(112);
  198. m.repeat(2);
  199. m.textByte(124);
  200. m.repeat(6);
  201. m.textByte(127);
  202. m.repeat(12);
  203. m.textMode();
  204. m.invertVideo();
  205. m.textColor(RED);
  206. m.bgColor(WHITE);
  207. m.text(" Si vous connaissez et acceptez les ", 1, 19);
  208. m.text(" conditions d'accès, tapez votre prénom ", 1, 20);
  209. m.text(" ou inventez un pseudo (5 à 31 signes) ", 1, 21);
  210. m.text(" Merci de rester correct. ", 1, 22);
  211. m.standardVideo();
  212. m.textColor(WHITE);
  213. m.bgColor(BLACK);
  214. m.text("...............................", 2, 23);
  215. m.text("Si vous ne les connaissez pas", 2, 24);
  216. m.textChar('+', 34, 23);
  217. m.specialChar(SPE_CHAR_ARROW_RIGHT, 34, 24);
  218. m.invertVideo();
  219. m.text("Envoi", 36, 23);
  220. m.text("Guide", 36, 24);
  221. m.standardVideo();
  222. m.textColor(WHITE);
  223. m.moveCursorTo(2, 23);
  224. m.cursor();
  225. delay(20000);
  226. }