tbillion

Untitled

Nov 22nd, 2017
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-----------------------------------------------------------------------------------------------------------------------------------------
  2.  
  3. //-----------------------------------------------------------------------------------------------------------------------------------------
  4.  
  5. Connex Control V1.12
  6. copyright Travis Johnson 2017
  7. ALL RIGHTS RESERVED
  8. //Revision 1.12 ChangeLog
  9. //
  10. //Changed BitMask to static instead of computation.
  11. //
  12. //
  13. //
  14. //
  15. //
  16. //
  17. //
  18. //
  19. //-----------------------------------------------------------------------------------------------------------------------------------------
  20.  
  21. #include <SimpleDHT.h>
  22. #include <Time.h>
  23. #include <DS1302RTC.h>
  24. #include <avr/pgmspace.h>
  25.  
  26.  
  27.  
  28.  
  29. int pins[29] = { 23, 22, 25, 24, 27, 26, 29, 28, 31, 30, 33, 32, 35, 34, 37, 36,39, 38, 41, 40, 43, 42, 45, 44,47, 46, 49, 48};
  30. int columnArray[8] = {pins[20], pins[21], pins[22], pins[23], pins[24], pins[25], pins[26], pins[27]};
  31. //int rowArray[20] = {pins[20], pins[19], pins[18], pins[17], pins[16], pins[15], pins[14], pins[13], pins[12], pins[11], pins[10], pins[9], pins[8], pins[7], pins[6], pins[5], pins[4], pins[3], pins[2], pins[1]};
  32. int rowArray[20] = {pins[0], pins[1], pins[2], pins[3], pins[4], pins[5], pins[6], pins[7], pins[8], pins[9], pins[10], pins[11], pins[12], pins[13], pins[14], pins[15], pins[16], pins[17], pins[18], pins[19]};
  33. int DriversPins[7] = {2, 3, 4, 5, 6, 7, 8};
  34. int pxl_clmn, cnt = 0, i, pxl_row, pos = 0, Buffer[100][8], BufferM[100][8], BS[8], pinDHT11 = 13, DHT11Temp = 0, DHT11Hum = 0;
  35. //char Message[] = {' ', ' ', ' ', 'S', 'k', 'y', 'N', 'e', 't', ' ', 'C', 'o', 'n', 't', 'r', 'o', 'l', ' ', 'V', '1', ' ', '0', '2', ' ', ' ' };
  36. //char Message[100];
  37. //char char_array[str_len];
  38. //char Message[] = {83};
  39. //String Msg = "SkyNet Control V1.03";
  40. byte temperature = 0, humidity = 0;
  41. time_t t = now();
  42. //int CharData[][8]
  43. /*const int CharData[][8] = { // Character positions are ASCII + 1 int
  44. {B00000000, B00000000, B00001000, B00001000, B00111110, B00001000, B00001000, B00000000}, //+
  45. {B00000000, B00000000, B00000000, B00000000, B00111100, B00000000, B00000000, B00000000}, //-
  46. {B00000000, B00000000, B00110110, B00011100, B01111111, B00011100, B00110110, B00000000}, //*
  47. {B00000000, B00001000, B00111110, B00001000, B00011100, B00100010, B00100010, B00011100},
  48. {B00000000, B00001000, B00011100, B00111110, B01111111, B00111110, B00011100, B00001000},
  49. {B00000000, B00000000, B00000000, B00111100, B00000000, B00111100, B00000000, B00000000}, //=
  50. {B00000000, B00000000, B00000000, B00111010, B01101100, B00000000, B00000000, B00000000}, //~
  51. {B00000000, B00001000, B00010100, B00100010, B01000001, B00000000, B00000000, B00000000}, //^
  52. {B00000000, B00000110, B00001100, B00011000, B00110000, B00011000, B00001100, B00000110}, //left arrow
  53. {B00000000, B01100000, B00110000, B00011000, B00001100, B00011000, B00110000, B01100000}, //
  54. {B00000000, B00000110, B00001100, B00011000, B00011000, B00011000, B00001100, B00000110}, //
  55. {B00000000, B01100000, B00110000, B00011000, B00011000, B00011000, B00110000, B01100000}, //
  56. {B00000000, B00011110, B00011000, B00011000, B00011000, B00011000, B00011000, B00011110}, //
  57. {B00000000, B01111000, B00011000, B00011000, B00011000, B00011000, B00011000, B01111000}, //
  58. {B00000000, B00001110, B00011000, B00011000, B00110000, B00011000, B00011000, B00001110}, //
  59. {B00000000, B01110000, B00011000, B00011000, B00001100, B00011000, B00011000, B01110000}, //
  60. {B00000000, B00011000, B00010100, B00010000, B00010000, B00110000, B01110000, B01100000},
  61. {B00000000, B00000000, B00011000, B00011000, B00000000, B00011000, B00011000, B00000000}, //
  62. {B00000000, B00000000, B00011000, B00011000, B00000000, B00011000, B00011000, B00110000}, //
  63. {B00000000, B00000000, B00000000, B00000000, B00110000, B00110000, B00110000, B01100000}, //
  64. {B00000000, B00011000, B00111100, B00111100, B00011000, B00011000, B00000000, B00011000}, //
  65. {B00000000, B00111100, B01100110, B00000110, B00011100, B00011000, B00000000, B00011000}, //
  66. {B00000000, B00111000, B01000100, B01011100, B01011000, B01000010, B00111100, B00000000},
  67. {B00000000, B00111100, B01100110, B00111100, B00101000, B01100101, B01100110, B00111111},
  68. {B00000000, B00001000, B00011110, B00100000, B00011100, B00000010, B00111100, B00001000},
  69. {B00000000, B00110110, B00110110, B01111111, B00110110, B01111111, B00110110, B00110110},
  70. {B00000000, B00001000, B00011100, B00111110, B01111111, B00011100, B00011100, B00011100},
  71. {B00000000, B00011100, B00011100, B00011100, B01111111, B00111110, B00011100, B00001000},
  72. {B00000000, B00001000, B00001100, B01111110, B01111111, B01111110, B00001100, B00001000},
  73. {B00000000, B00001000, B00011000, B00111111, B01111111, B00111111, B00011000, B00001000},
  74. {B00000000, B00001000, B00011100, B00011100, B00111110, B00111110, B01111111, B01111111},
  75. {B00000000, B01100000, B01111000, B01111110, B01111111, B01111110, B01111000, B01100000},
  76. {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000}, //Space
  77. {B00000000, B00000011, B00001111, B00111111, B01111111, B00111111, B00001111, B00000011},
  78. {B00000000, B00111110, B01000001, B01010101, B01000001, B01010101, B01001001, B00111110},
  79. {B00000000, B00111110, B01111111, B01101011, B01111111, B01101011, B01110111, B00111110},
  80. {B00000000, B00100010, B01110111, B01111111, B01111111, B00111110, B00011100, B00001000},
  81. {B00000000, B01100000, B01100110, B00001100, B00011000, B00110000, B01100110, B00000110}, //%
  82. {B00000000, B00001000, B00011100, B00101010, B01111111, B00101010, B00001000, B00011100},
  83. {B00000000, B00001000, B00011100, B00111110, B01111111, B00111110, B00001000, B00011100},
  84. {B00000000, B00000000, B00011100, B00111110, B00111110, B00111110, B00011100, B00000000},
  85. {B11111111, B11111111, B11100011, B11000001, B11000001, B11000001, B11100011, B11111111},
  86. {B00000000, B00000000, B00011100, B00100010, B00100010, B00100010, B00011100, B00000000},
  87. {B11111111, B11111111, B11100011, B11011101, B11011101, B11011101, B11100011, B11111111},
  88. {B11111111, B11111111, B11100011, B11011101, B11011101, B11011101, B11100011, B11111111},
  89. {B00000000, B00001111, B00000011, B00000101, B00111001, B01001000, B01001000, B00110000},
  90. {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B01100000, B01100000}, // Period
  91. {B00000000, B00000000, B00000110, B00001100, B00011000, B00110000, B01100000, B00000000}, ///
  92. {B00000000, B00111100, B01100110, B01101110, B01110110, B01100110, B01100110, B00111100}, //0
  93. {B00000000, B00011000, B00011000, B00111000, B00011000, B00011000, B00011000, B01111110}, //1
  94. {B00000000, B00111100, B01100110, B00000110, B00001100, B00110000, B01100000, B01111110}, //2
  95. {B00000000, B00111100, B01100110, B00000110, B00011100, B00000110, B01100110, B00111100}, //3
  96. {B00000000, B00001100, B00011100, B00101100, B01001100, B01111110, B00001100, B00001100}, //4
  97. {B00000000, B01111110, B01100000, B01111100, B00000110, B00000110, B01100110, B00111100}, //5
  98. {B00000000, B00111100, B01100110, B01100000, B01111100, B01100110, B01100110, B00111100}, //6
  99. {B00000000, B01111110, B01100110, B00001100, B00001100, B00011000, B00011000, B00011000}, //7
  100. {B00000000, B00111100, B01100110, B01100110, B00111100, B01100110, B01100110, B00111100}, //8
  101. {B00000000, B00111100, B01100110, B01100110, B00111110, B00000110, B01100110, B00111100}, //9
  102. {B00000000, B00110000, B00110000, B00000000, B00000000, B00110000, B00110000, B00000000}, //:
  103. {B00000000, B00001111, B00011001, B00010001, B00010011, B00110111, B01110110, B01100000},
  104. {B00000000, B01100110, B01100110, B01100110, B01100110, B00000000, B01100110, B01100110},
  105. {B00000000, B00000000, B00010100, B00100010, B01111111, B00100010, B00010100, B00000000},
  106. {B00000000, B00000000, B00010100, B00100010, B01111111, B00100010, B00010100, B00000000},
  107. {B00000000, B00000000, B00010100, B00100010, B01111111, B00100010, B00010100, B00000000},
  108. {B00000000, B00110110, B00110110, B00010100, B00000000, B00000000, B00000000, B00000000},
  109. {B00000000, B00111100, B01100110, B01100110, B01111110, B01100110, B01100110, B01100110}, //A
  110. {B00000000, B01111100, B01100110, B01100110, B01111100, B01100110, B01100110, B01111100}, //B
  111. {B00000000, B00111100, B01100110, B01100000, B01100000, B01100000, B01100110, B00111100}, //C
  112. {B00000000, B01111100, B01100110, B01100110, B01100110, B01100110, B01100110, B01111100}, //D
  113. {B00000000, B01111110, B01100000, B01100000, B01111100, B01100000, B01100000, B01111110}, //E
  114. {B00000000, B01111110, B01100000, B01100000, B01111100, B01100000, B01100000, B01100000}, //F
  115. {B00000000, B00111100, B01100110, B01100000, B01100000, B01101110, B01100110, B00111100}, //G
  116. {B00000000, B01100110, B01100110, B01100110, B01111110, B01100110, B01100110, B01100110}, //H
  117. {B00000000, B00111100, B00011000, B00011000, B00011000, B00011000, B00011000, B00111100}, //I
  118. {B00000000, B00011110, B00001100, B00001100, B00001100, B01101100, B01101100, B00111000}, //J
  119. {B00000000, B01100110, B01101100, B01111000, B01110000, B01111000, B01101100, B01100110}, //K
  120. {B00000000, B01100000, B01100000, B01100000, B01100000, B01100000, B01100000, B01111110}, //L
  121. {B00000000, B01100011, B01110111, B01111111, B01101011, B01100011, B01100011, B01100011}, //M
  122. {B00000000, B01100011, B01110011, B01111011, B01101111, B01100111, B01100011, B01100011}, //N
  123. {B00000000, B00111100, B01100110, B01100110, B01100110, B01100110, B01100110, B00111100}, //O
  124. {B00000000, B01111100, B01100110, B01100110, B01100110, B01111100, B01100000, B01100000}, //P
  125. {B00000000, B00111100, B01100110, B01100110, B01100110, B01101110, B00111100, B00000110}, //Q
  126. {B00000000, B01111100, B01100110, B01100110, B01111100, B01111000, B01101100, B01100110}, //R
  127. {B00000000, B00111100, B01100110, B01100000, B00111100, B00000110, B01100110, B00111100}, //S
  128. {B00000000, B01111110, B01011010, B00011000, B00011000, B00011000, B00011000, B00011000}, //T
  129. {B00000000, B01100110, B01100110, B01100110, B01100110, B01100110, B01100110, B00111110}, //U
  130. {B00000000, B01100110, B01100110, B01100110, B01100110, B01100110, B00111100, B00011000}, //V
  131. {B00000000, B01100011, B01100011, B01100011, B01101011, B01111111, B01110111, B01100011}, //W
  132. {B00000000, B01100011, B01100011, B00110110, B00011100, B00110110, B01100011, B01100011}, //X
  133. {B00000000, B01100110, B01100110, B01100110, B00111100, B00011000, B00011000, B00011000}, //Y
  134. {B00000000, B01111110, B00000110, B00001100, B00011000, B00110000, B01100000, B01111110}, //Z
  135. {B00000000, B00000001, B00000010, B00000100, B10001000, B01010000, B00100000, B00000000},
  136. {B00111000, B00111000, B00111000, B00111000, B11111110, B01111100, B00111000, B00010000},
  137. {B00001000, B00001100, B11111110, B11111111, B11111110, B00001100, B00001000, B00000000},
  138. {B00010000, B00111000, B01111100, B11111110, B00111000, B00111000, B00111000, B00111000},
  139. {B00010000, B00110000, B01111111, B11111111, B01111111, B00110000, B00010000, B00000000},
  140. {B00111000, B01101100, B01101100, B00111000, B00000000, B00000000, B00000000, B00000000}, //Degrees
  141. {B00000000, B00000000, B00000000, B00111100, B00000110, B00111110, B01100110, B00111110}, //a
  142. {B00000000, B01100000, B01100000, B01100000, B01111100, B01100110, B01100110, B01111100}, //b
  143. {B00000000, B00000000, B00000000, B00111100, B01100110, B01100000, B01100110, B00111100}, //c
  144. {B00000000, B00000110, B00000110, B00000110, B00111110, B01100110, B01100110, B00111110}, //d
  145. {B00000000, B00000000, B00000000, B00111100, B01100110, B01111110, B01100000, B00111100}, //e
  146. {B00000000, B00011100, B00110110, B00110000, B00110000, B01111100, B00110000, B00110000}, //f
  147. {B00000000, B00000000, B00111110, B01100110, B01100110, B00111110, B00000110, B00111100}, //g
  148. {B00000000, B01100000, B01100000, B01100000, B01111100, B01100110, B01100110, B01100110}, //h
  149. {B00000000, B00000000, B00011000, B00000000, B00011000, B00011000, B00011000, B00111100}, //i
  150. {B00000000, B00001100, B00000000, B00001100, B00001100, B01101100, B01101100, B00111000}, //j
  151. {B00000000, B01100000, B01100000, B01100110, B01101100, B01111000, B01101100, B01100110}, //k
  152. {B00000000, B00011000, B00011000, B00011000, B00011000, B00011000, B00011000, B00011000}, //l
  153. {B00000000, B00000000, B00000000, B01100011, B01110111, B01111111, B01101011, B01101011}, //m
  154. {B00000000, B00000000, B00000000, B01111100, B01111110, B01100110, B01100110, B01100110}, //n
  155. {B00000000, B00000000, B00000000, B00111100, B01100110, B01100110, B01100110, B00111100}, //o
  156. {B00000000, B00000000, B01111100, B01100110, B01100110, B01111100, B01100000, B01100000}, //p
  157. {B00000000, B00000000, B00111100, B01101100, B01101100, B00111100, B00001101, B00001111}, //q
  158. {B00000000, B00000000, B00000000, B01111100, B01100110, B01100110, B01100000, B01100000}, //r
  159. {B00000000, B00000000, B00000000, B00111110, B01000000, B00111100, B00000010, B01111100}, //s
  160. {B00000000, B00000000, B00011000, B00011000, B01111110, B00011000, B00011000, B00011000}, //t
  161. {B00000000, B00000000, B00000000, B01100110, B01100110, B01100110, B01100110, B00111110}, //u
  162. {B00000000, B00000000, B00000000, B00000000, B01100110, B01100110, B00111100, B00011000}, //v
  163. {B00000000, B00000000, B00000000, B01100011, B01101011, B01101011, B01101011, B00111110}, //w
  164. {B00000000, B00000000, B00000000, B01100110, B00111100, B00011000, B00111100, B01100110}, //x
  165. {B00000000, B00000000, B00000000, B01100110, B01100110, B00111110, B00000110, B00111100}, //y
  166. {B00000000, B00000000, B00000000, B00111100, B00001100, B00011000, B00110000, B00111100}, //z
  167. {B00111000, B01101100, B01100100, B11110000, B01100000, B11100110, B11111100, B00000000},
  168. {B11001100, B11001100, B01111000, B11111100, B00110000, B11111100, B00110000, B00110000},
  169. {B00111110, B01100011, B00111000, B01101100, B01101100, B00111000, B11001100, B01111000},
  170. {B00111100, B01000010, B10011001, B10100001, B10100001, B10011001, B01000010, B00111100},
  171. {B00000000, B00110011, B01100110, B11001100, B01100110, B00110011, B00000000, B00000000},
  172. {B00111100, B01000010, B10111001, B10100101, B10111001, B10100101, B01000010, B00111100},
  173. {B00000000, B00001000, B00011100, B00101010, B00001000, B00101010, B00011100, B00001000},
  174. {B00011000, B00011000, B01111110, B00011000, B00011000, B00000000, B01111110, B00000000},
  175. {B00010000, B00110000, B00010000, B00111000, B00000000, B00000000, B00000000, B00000000},
  176. {B00111000, B00001100, B00011000, B00110000, B00111100, B00000000, B00000000, B00000000},
  177. {B00111000, B00001100, B00011000, B00001100, B00111000, B00000000, B00000000, B00000000},
  178. {B00000000, B00000000, B01100110, B01100110, B01100110, B01111100, B01100000, B11000000},
  179. {B01111111, B11011011, B11011011, B01111011, B00011011, B00011011, B00011011, B00000000},
  180. {B00000000, B11001100, B01100110, B00110011, B01100110, B11001100, B00000000, B00000000},
  181. {B11000011, B11000110, B11001100, B10111101, B00110111, B01101111, B11001111, B11000000},
  182. {B11000011, B11000110, B11001100, B11011110, B00110011, B01100110, B11001100, B00001111},
  183. {B11000000, B00100011, B11000110, B00101101, B11011011, B00110101, B01100111, B00000001},
  184. {B00110000, B00000000, B00110000, B01100000, B11000000, B11001100, B01111000, B00000000},
  185. {B11100000, B00000000, B00111000, B01101100, B11000110, B11111110, B11000110, B00000000},
  186. {B00001110, B00000000, B00111000, B01101100, B11000110, B11111110, B11000110, B00000000},
  187. {B00111000, B01101100, B00000000, B01111100, B11000110, B11111110, B11000110, B00000000},
  188. {B01110110, B11011100, B00000000, B01111100, B11000110, B11111110, B11000110, B00000000},
  189. {B11000110, B00111000, B01101100, B11000110, B11111110, B11000110, B11000110, B00000000},
  190. {B00110000, B00110000, B00000000, B01111000, B11001100, B11111100, B11001100, B00000000},
  191. {B00111110, B01101100, B11001100, B11111110, B11001100, B11001100, B11001110, B00000000},
  192. {B01111000, B11001100, B11000000, B11001100, B01111000, B00011000, B00001100, B01111000},
  193. {B11100000, B00000000, B11111100, B01100000, B01111000, B01100000, B11111100, B00000000},
  194. {B00011100, B00000000, B11111100, B01100000, B01111000, B01100000, B11111100, B00000000},
  195. {B00110000, B01001000, B11111100, B01100000, B01111000, B01100000, B11111100, B00000000},
  196. {B01101100, B00000000, B11111100, B01100000, B01111000, B01100000, B11111100, B00000000},
  197. {B11100000, B00000000, B01111000, B00110000, B00110000, B00110000, B01111000, B00000000},
  198. {B00011100, B00000000, B01111000, B00110000, B00110000, B00110000, B01111000, B00000000},
  199. {B00110000, B01001000, B00000000, B01111000, B00110000, B00110000, B01111000, B00000000},
  200. {B11001100, B00000000, B01111000, B00110000, B00110000, B00110000, B01111000, B00000000},
  201. {B11111100, B01100110, B11110110, B11110110, B01100110, B01100110, B11111100, B00000000},
  202. {B11111100, B00000000, B11001100, B11101100, B11111100, B11011100, B11001100, B00000000},
  203. {B01110000, B00000000, B00011000, B00111100, B01100110, B00111100, B00011000, B00000000},
  204. {B00001110, B00000000, B00011000, B00111100, B01100110, B00111100, B00011000, B00000000},
  205. {B00111100, B01100110, B00011000, B00111100, B01100110, B00111100, B00011000, B00000000},
  206. {B01110110, B11011100, B00000000, B01111100, B11000110, B11000110, B01111100, B00000000},
  207. {B11000011, B00011000, B00111100, B01100110, B01100110, B00111100, B00011000, B00000000},
  208. {B00000000, B01101100, B00111000, B00010000, B00111000, B01101100, B00000000, B00000000},
  209. {B00111010, B01101100, B11001110, B11011110, B11110110, B01101100, B10111000, B00000000},
  210. {B01110000, B00000000, B01100110, B01100110, B01100110, B01100110, B00111100, B00000000},
  211. {B00011000, B00011000, B01111110, B11000000, B11000000, B01111110, B00011000, B00011000},
  212. {B00001110, B00000000, B01100110, B01100110, B01100110, B01100110, B00111100, B00000000},
  213. {B00111100, B01100110, B00000000, B01100110, B01100110, B01100110, B00111100, B00000000},
  214. {B11001100, B00000000, B11001100, B11001100, B11001100, B11001100, B01111000, B00000000},
  215. {B00000000, B00000000, B01100000, B00110000, B00011000, B00001100, B00000110, B00000000},
  216. {B00000000, B00001100, B00001100, B00000110, B00000000, B00000000, B00000000, B00000000},
  217. {B00000000, B00011000, B00011000, B00011000, B00110000, B00000000, B00000000, B00000000},
  218. {B00000000, B00001000, B00011100, B00110110, B01100011, B01000001, B01000001, B01111111},
  219. {B00000000, B00000010, B00000010, B00001010, B00001010, B00101010, B00101010, B10101010},
  220. {B10000100, B10000100, B10000100, B10000100, B10000100, B10000100, B10000100, B11111100},
  221. {B10000100, B10000100, B10000100, B10000100, B10000100, B10110100, B10000100, B11111100},
  222. {B10000100, B10000100, B10000100, B10110100, B10000100, B10110100, B10000100, B11111100},
  223. {B10000100, B10110100, B10000100, B10110100, B10000100, B10110100, B10000100, B11111100},
  224. {B10000100, B10000100, B10000100, B10110100, B10110100, B10110100, B10000100, B11111100},
  225. {B10110100, B10110100, B10110100, B10110100, B10110100, B10110100, B10000100, B11111100},
  226. {B00001110, B00000000, B01100110, B01100110, B00111100, B00011000, B00011000, B00000000},
  227. {B11110000, B01100000, B01111100, B01100110, B01100110, B01111100, B01100000, B11110000},
  228. {B00000000, B01111000, B11001100, B11111000, B11001100, B11111000, B11000000, B11000000},
  229. {B11100000, B00000000, B01111000, B00001100, B01111100, B11001100, B01111110, B00000000},
  230. {B00011100, B00000000, B01111000, B00001100, B01111100, B11001100, B01111110, B00000000},
  231. {B01111110, B11000011, B00111100, B00000110, B00111110, B01100110, B00111111, B00000000},
  232. {B01110110, B11011100, B01111000, B00001100, B01111100, B11001100, B01111110, B00000000},
  233. {B11001100, B00000000, B01111000, B00001100, B01111100, B11001100, B01111110, B00000000},
  234. {B00110000, B00110000, B01111000, B00001100, B01111100, B11001100, B01111110, B00000000},
  235. {B00000000, B00000000, B01111111, B00001100, B01111111, B11001100, B01111111, B00000000},
  236. {B00000000, B00000000, B01111000, B11000000, B11000000, B01111000, B00001100, B00111000},
  237. {B11100000, B00000000, B01111000, B11001100, B11111100, B11000000, B01111000, B00000000},
  238. {B00011100, B00000000, B01111000, B11001100, B11111100, B11000000, B01111000, B00000000},
  239. {B01111110, B11000011, B00111100, B01100110, B01111110, B01100000, B00111100, B00000000},
  240. {B11001100, B00000000, B01111000, B11001100, B11111100, B11000000, B01111000, B00000000},
  241. {B11100000, B00000000, B01110000, B00110000, B00110000, B00110000, B01111000, B00000000},
  242. {B00111000, B00000000, B01110000, B00110000, B00110000, B00110000, B01111000, B00000000},
  243. {B01111100, B11000110, B00111000, B00011000, B00011000, B00011000, B00111100, B00000000},
  244. {B11001100, B00000000, B01110000, B00110000, B00110000, B00110000, B01111000, B00000000},
  245. {B11011000, B01110000, B11011000, B00001100, B01111100, B11001100, B01111000, B00000000},
  246. {B00000000, B11111000, B00000000, B11111000, B11001100, B11001100, B11001100, B00000000},
  247. {B00000000, B11100000, B00000000, B01111000, B11001100, B11001100, B01111000, B00000000},
  248. {B00000000, B00011100, B00000000, B01111000, B11001100, B11001100, B01111000, B00000000},
  249. {B01111000, B11001100, B00000000, B01111000, B11001100, B11001100, B01111000, B00000000},
  250. {B01110110, B11011100, B00000000, B01111000, B11001100, B11001100, B01111000, B00000000},
  251. {B00000000, B11001100, B00000000, B01111000, B11001100, B11001100, B01111000, B00000000},
  252. {B00000000, B00000110, B00111100, B01101110, B01111110, B01110110, B00111100, B01100000},
  253. {B00000000, B11100000, B00000000, B11001100, B11001100, B11001100, B01111110, B00000000},
  254. {B00000000, B01111111, B01111111, B00111110, B00111110, B00011100, B00011100, B00001000},
  255. {B00000000, B00011100, B00000000, B11001100, B11001100, B11001100, B01111110, B00000000}, //
  256. {B01111000, B11001100, B00000000, B11001100, B11001100, B11001100, B01111110, B00000000}, //
  257. {B00000000, B11001100, B00000000, B11001100, B11001100, B11001100, B01111110, B00000000}, //
  258. {B00000000, B00011100, B00000000, B11001100, B11001100, B01111100, B00001100, B11111000}, //
  259. {B00000000, B00001000, B00101010, B00011100, B01110111, B00011100, B00101010, B00001000},
  260. {B00000000, B00000000, B01100000, B01111100, B01100110, B01111100, B01100000, B00000000}, //
  261. {B00000000, B11001100, B00000000, B11001100, B11001100, B01111100, B00001100, B11111000} //
  262. };*/
  263. const PROGMEM int CharData[][8] = { // Character positions are ASCII + 1 int
  264. {B00000000, B00000000, B00010000, B00010000, B01111100, B00010000, B00010000, B00000000, },
  265. {B00000000, B00000000, B00010000, B00010000, B00010000, B00010000, B00000000, B00000000, },
  266. {B00000000, B00010000, B01010100, B01111100, B00111000, B01111100, B01010100, B00010000, },
  267. {B00000000, B00000000, B01100100, B10010100, B10011110, B10010100, B01100100, B00000000, },
  268. {B00000000, B00010000, B00111000, B01111100, B11111110, B01111100, B00111000, B00010000, },
  269. {B00000000, B00000000, B00101000, B00101000, B00101000, B00101000, B00000000, B00000000, },
  270. {B00000000, B00010000, B00011000, B00001000, B00011000, B00010000, B00001000, B00000000, },
  271. {B00000000, B00010000, B00001000, B00000100, B00000010, B00000100, B00001000, B00010000, },
  272. {B00000000, B00000000, B00010000, B00111000, B01101100, B11000110, B10000010, B00000000, },
  273. {B00000000, B10000010, B11000110, B01101100, B00111000, B00010000, B00000000, B00000000, },
  274. {B00000000, B00000000, B00000000, B00111000, B01111100, B11000110, B10000010, B00000000, },
  275. {B00000000, B10000010, B11000110, B01111100, B00111000, B00000000, B00000000, B00000000, },
  276. {B00000000, B00000000, B00000000, B11111110, B11111110, B10000010, B10000010, B00000000, },
  277. {B00000000, B10000010, B10000010, B11111110, B11111110, B00000000, B00000000, B00000000, },
  278. {B00000000, B00000000, B00010000, B01111100, B11101110, B10000010, B10000010, B00000000, },
  279. {B00000000, B10000010, B10000010, B11101110, B01111100, B00010000, B00000000, B00000000, },
  280. {B00000000, B11000000, B11100000, B01111110, B00000010, B00000100, B00000000, B00000000, },
  281. {B00000000, B00000000, B00000000, B01101100, B01101100, B00000000, B00000000, B00000000, },
  282. {B00000000, B00000000, B10000000, B11101100, B01101100, B00000000, B00000000, B00000000, },
  283. {B00000000, B10000000, B11110000, B01110000, B00000000, B00000000, B00000000, B00000000, },
  284. {B00000000, B00000000, B00001100, B10111110, B10111110, B00001100, B00000000, B00000000, },
  285. {B00000000, B00000100, B00000110, B10110010, B10110010, B00011110, B00001100, B00000000, },
  286. {B00000000, B00111100, B01000010, B01011010, B01011010, B01001100, B00100000, B00000000, },
  287. {B00000000, B01100100, B11111110, B10001010, B10011010, B11101110, B11000100, B10100000, },
  288. {B00000000, B00000000, B01001000, B01010100, B11010110, B01010100, B00100100, B00000000, },
  289. {B00000000, B00101000, B11111110, B11111110, B00101000, B11111110, B11111110, B00101000, },
  290. {B00000000, B00010000, B00011000, B11111100, B11111110, B11111100, B00011000, B00010000, },
  291. {B00000000, B00010000, B00110000, B01111110, B11111110, B01111110, B00110000, B00010000, },
  292. {B00000000, B00111000, B00111000, B00111000, B11111110, B01111100, B00111000, B00010000, },
  293. {B00000000, B00010000, B00111000, B01111100, B11111110, B00111000, B00111000, B00111000, },
  294. {B00000000, B11000000, B11110000, B11111100, B11111110, B11111100, B11110000, B11000000, },
  295. {B00000000, B11111110, B11111110, B01111100, B01111100, B00111000, B00111000, B00010000, },
  296. {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, },
  297. {B00000000, B00010000, B00111000, B00111000, B01111100, B01111100, B11111110, B11111110, },
  298. {B00000000, B01111100, B10000010, B10101010, B11000010, B10101010, B10000010, B01111100, },
  299. {B00000000, B01111100, B11111110, B11010110, B10111110, B11010110, B11111110, B01111100, },
  300. {B00000000, B00011100, B00111110, B01111100, B11111000, B01111100, B00111110, B00011100, },
  301. {B00000000, B01000110, B01100110, B00110000, B00011000, B11001100, B11000100, B00000000, },
  302. {B00000000, B00010000, B00111000, B10010100, B11111110, B10010100, B00111000, B00010000, },
  303. {B00000000, B00010000, B00111000, B10111100, B11111110, B10111100, B00111000, B00010000, },
  304. {B00000000, B00000000, B00111000, B01111100, B01111100, B01111100, B00111000, B00000000, },
  305. {B11111111, B11111111, B11000111, B10000011, B10000011, B10000011, B11000111, B11111111, },
  306. {B00000000, B00000000, B00111000, B01000100, B01000100, B01000100, B00111000, B00000000, },
  307. {B11111111, B11111111, B11000111, B10111011, B10111011, B10111011, B11000111, B11111111, },
  308. {B11111111, B11111111, B11000111, B10111011, B10111011, B10111011, B11000111, B11111111, },
  309. {B00000000, B01100000, B10010000, B10010000, B01110010, B00001010, B00000110, B00011110, },
  310. {B00000000, B11000000, B11000000, B00000000, B00000000, B00000000, B00000000, B00000000, },
  311. {B00000000, B01000000, B01100000, B00110000, B00011000, B00001100, B00000100, B00000000, },
  312. {B00000000, B01111100, B11111110, B10010010, B10001010, B11111110, B01111100, B00000000, },
  313. {B00000000, B10000000, B10001000, B11111110, B11111110, B10000000, B10000000, B00000000, },
  314. {B00000000, B11000100, B11100110, B10100010, B10010010, B10011110, B10001100, B00000000, },
  315. {B00000000, B01000100, B11000110, B10010010, B10010010, B11111110, B01101100, B00000000, },
  316. {B00000000, B00110000, B00101000, B00100100, B11111110, B11111110, B00100000, B00000000, },
  317. {B00000000, B01001110, B11001110, B10001010, B10001010, B11111010, B01110010, B00000000, },
  318. {B00000000, B01111100, B11111110, B10010010, B10010010, B11110110, B01100100, B00000000, },
  319. {B00000000, B00000110, B00000110, B11100010, B11111010, B00011110, B00000110, B00000000, },
  320. {B00000000, B01101100, B11111110, B10010010, B10010010, B11111110, B01101100, B00000000, },
  321. {B00000000, B01001100, B11011110, B10010010, B10010010, B11111110, B01111100, B00000000, },
  322. {B00000000, B00000000, B01100110, B01100110, B00000000, B00000000, B00000000, B00000000, },
  323. {B00000000, B11000000, B11100000, B01111100, B00000110, B01100010, B01110010, B00111110, },
  324. {B00000000, B11011110, B11011110, B00000000, B00000000, B11011110, B11011110, B00000000, },
  325. {B00000000, B00010000, B00111000, B01010100, B00010000, B01010100, B00111000, B00010000, },
  326. {B00000000, B00010000, B00111000, B01010100, B00010000, B01010100, B00111000, B00010000, },
  327. {B00000000, B00010000, B00111000, B01010100, B00010000, B01010100, B00111000, B00010000, },
  328. {B00000000, B00000000, B00000110, B00001110, B00000000, B00001110, B00000110, B00000000, },
  329. {B00000000, B11111100, B11111110, B00010010, B00010010, B11111110, B11111100, B00000000, },
  330. {B00000000, B11111110, B11111110, B10010010, B10010010, B11111110, B01101100, B00000000, },
  331. {B00000000, B01111100, B11111110, B10000010, B10000010, B11000110, B01000100, B00000000, },
  332. {B00000000, B11111110, B11111110, B10000010, B10000010, B11111110, B01111100, B00000000, },
  333. {B00000000, B11111110, B11111110, B10010010, B10010010, B10010010, B10000010, B00000000, },
  334. {B00000000, B11111110, B11111110, B00010010, B00010010, B00010010, B00000010, B00000000, },
  335. {B00000000, B01111100, B11111110, B10000010, B10100010, B11100110, B01100100, B00000000, },
  336. {B00000000, B11111110, B11111110, B00010000, B00010000, B11111110, B11111110, B00000000, },
  337. {B00000000, B00000000, B10000010, B11111110, B11111110, B10000010, B00000000, B00000000, },
  338. {B00000000, B01100000, B11100000, B10000010, B11111110, B01111110, B00000010, B00000000, },
  339. {B00000000, B11111110, B11111110, B00111000, B01101100, B11000110, B10000010, B00000000, },
  340. {B00000000, B11111110, B11111110, B10000000, B10000000, B10000000, B10000000, B00000000, },
  341. {B00000000, B11111110, B11111110, B00001100, B00011000, B00001100, B11111110, B11111110, },
  342. {B00000000, B11111110, B11111110, B00001100, B00011000, B00110000, B11111110, B11111110, },
  343. {B00000000, B01111100, B11111110, B10000010, B10000010, B11111110, B01111100, B00000000, },
  344. {B00000000, B11111110, B11111110, B00100010, B00100010, B00111110, B00011100, B00000000, },
  345. {B00000000, B00111100, B01111110, B01000010, B01100010, B11111110, B10111100, B00000000, },
  346. {B00000000, B11111110, B11111110, B00110010, B01110010, B11011110, B10001100, B00000000, },
  347. {B00000000, B01001100, B11011110, B10010010, B10010010, B11110110, B01100100, B00000000, },
  348. {B00000000, B00000110, B00000010, B11111110, B11111110, B00000010, B00000110, B00000000, },
  349. {B00000000, B01111110, B11111110, B10000000, B10000000, B11111110, B11111110, B00000000, },
  350. {B00000000, B00111110, B01111110, B11000000, B11000000, B01111110, B00111110, B00000000, },
  351. {B00000000, B11111110, B11111110, B01100000, B00110000, B01100000, B11111110, B11111110, },
  352. {B00000000, B11000110, B11101110, B00111000, B00010000, B00111000, B11101110, B11000110, },
  353. {B00000000, B00001110, B00011110, B11110000, B11110000, B00011110, B00001110, B00000000, },
  354. {B00000000, B11000010, B11100010, B10110010, B10011010, B10001110, B10000110, B00000000, },
  355. {B00010000, B00100000, B01000000, B00100000, B00010000, B00001000, B00000100, B00000010, },
  356. {B00010000, B00110000, B01111111, B11111111, B01111111, B00110000, B00010000, B00000000, },
  357. {B00011100, B00011100, B00011100, B00011100, B01111111, B00111110, B00011100, B00001000, },
  358. {B00001000, B00001100, B11111110, B11111111, B11111110, B00001100, B00001000, B00000000, },
  359. {B00001000, B00011100, B00111110, B01111111, B00011100, B00011100, B00011100, B00011100, },
  360. {B00000000, B00000110, B00001111, B00001001, B00001111, B00000110, B00000000, B00000000, },
  361. {B00000000, B01000000, B11101000, B10101000, B10101000, B11111000, B11110000, B00000000, },
  362. {B00000000, B11111110, B11111110, B10010000, B10010000, B11110000, B01100000, B00000000, },
  363. {B00000000, B01110000, B11111000, B10001000, B10001000, B11011000, B01010000, B00000000, },
  364. {B00000000, B01100000, B11110000, B10010000, B10010000, B11111110, B11111110, B00000000, },
  365. {B00000000, B01110000, B11111000, B10101000, B10101000, B10111000, B00110000, B00000000, },
  366. {B00000000, B00100000, B11111100, B11111110, B00100010, B00100110, B00000100, B00000000, },
  367. {B00000000, B00011000, B10111100, B10100100, B10100100, B11111100, B01111100, B00000000, },
  368. {B00000000, B11111110, B11111110, B00010000, B00010000, B11110000, B11100000, B00000000, },
  369. {B00000000, B00000000, B10000000, B11110100, B11110100, B10000000, B00000000, B00000000, },
  370. {B00000000, B01100000, B11100000, B10000000, B11111010, B01111010, B00000000, B00000000, },
  371. {B00000000, B11111110, B11111110, B00100000, B01110000, B11011000, B10001000, B00000000, },
  372. {B00000000, B00000000, B00000000, B11111110, B11111110, B00000000, B00000000, B00000000, },
  373. {B00000000, B11111000, B11111000, B00110000, B11100000, B00110000, B11111000, B11111000, },
  374. {B00000000, B11111000, B11111000, B00011000, B00011000, B11111000, B11110000, B00000000, },
  375. {B00000000, B01110000, B11111000, B10001000, B10001000, B11111000, B01110000, B00000000, },
  376. {B00000000, B11111100, B11111100, B00100100, B00100100, B00111100, B00011000, B00000000, },
  377. {B00000000, B00011000, B00111100, B00100100, B11111100, B11111100, B10000000, B11000000, },
  378. {B00000000, B11111000, B11111000, B00001000, B00001000, B00111000, B00110000, B00000000, },
  379. {B00000000, B10010000, B10101000, B10101000, B10101000, B10101000, B01001000, B00000000, },
  380. {B00000000, B00010000, B00010000, B11111100, B11111100, B00010000, B00010000, B00000000, },
  381. {B00000000, B01111000, B11111000, B10000000, B10000000, B11111000, B11111000, B00000000, },
  382. {B00000000, B00110000, B01110000, B11000000, B11000000, B01110000, B00110000, B00000000, },
  383. {B00000000, B01111000, B11111000, B10000000, B11110000, B10000000, B11111000, B01111000, },
  384. {B00000000, B10001000, B11011000, B01110000, B01110000, B11011000, B10001000, B00000000, },
  385. {B00000000, B00011000, B10111000, B10100000, B10100000, B11111000, B01111000, B00000000, },
  386. {B00000000, B00000000, B11001000, B11101000, B10111000, B10011000, B00000000, B00000000, },
  387. {B01101000, B01111110, B01111111, B01001001, B01000011, B01100110, B00100000, B00000000, },
  388. {B00101011, B00101111, B11111100, B11111100, B00101111, B00101011, B00000000, B00000000, },
  389. {B01000000, B11011010, B10111111, B10100101, B11111101, B01011001, B00000011, B00000010, },
  390. {B00111100, B01000010, B10011001, B10100101, B10100101, B10000001, B01000010, B00111100, },
  391. {B00001000, B00011100, B00110110, B00100010, B00001000, B00011100, B00110110, B00100010, },
  392. {B00111100, B01000010, B10111101, B10010101, B10010101, B10101001, B01000010, B00111100, },
  393. {B00000000, B00000000, B00101000, B01000100, B11111110, B01000100, B00101000, B00000000, },
  394. {B00000000, B01000100, B01000100, B01011111, B01011111, B01000100, B01000100, B00000000, },
  395. {B00000000, B00000000, B00001010, B00001111, B00001000, B00000000, B00000000, B00000000, },
  396. {B00000000, B00000000, B00011001, B00011101, B00010111, B00010010, B00000000, B00000000, },
  397. {B00000000, B00000000, B00010001, B00010101, B00011111, B00001010, B00000000, B00000000, },
  398. {B10000000, B11111100, B01111100, B00100000, B00100000, B00111100, B00011100, B00000000, },
  399. {B00000110, B00001111, B00001001, B01111111, B01111111, B00000001, B01111111, B01111111, },
  400. {B00100010, B00110110, B00011100, B00001000, B00100010, B00110110, B00011100, B00001000, },
  401. {B11001111, B11100111, B00111000, B00011000, B01101100, B01111110, B01110011, B01111001, },
  402. {B01001111, B01101111, B00110000, B00011000, B11001100, B11101110, B10111011, B10010001, },
  403. {B00010101, B01010101, B01101010, B00110000, B00011000, B01101100, B01010110, B11111010, },
  404. {B00110000, B01111000, B01001101, B01000101, B01100000, B00100000, B00000000, B00000000, },
  405. {B01110001, B01111001, B00101101, B00100100, B00101100, B01111000, B01110000, B00000000, },
  406. {B01110000, B01111000, B00101100, B00100100, B00101101, B01111001, B01110001, B00000000, },
  407. {B01110000, B01111010, B00101011, B00101001, B00101011, B01111010, B01110000, B00000000, },
  408. {B01110010, B01111011, B00101001, B00101011, B00101010, B01111011, B01110001, B00000000, },
  409. {B01111001, B01111101, B00010110, B00010010, B00010110, B01111101, B01111001, B00000000, },
  410. {B01110000, B01111000, B00101011, B00101011, B01111000, B01110000, B00000000, B00000000, },
  411. {B01111100, B01111110, B00001011, B00001001, B01111111, B01111111, B01001001, B00000000, },
  412. {B00001110, B10011111, B10010001, B10110001, B11111011, B01001010, B00000000, B00000000, },
  413. {B01000101, B01111101, B01111101, B01010100, B01010100, B01000100, B00000000, B00000000, },
  414. {B01000100, B01111100, B01111100, B01010101, B01010101, B01000101, B00000000, B00000000, },
  415. {B01000100, B01111110, B01111101, B01010101, B01010110, B01000100, B00000000, B00000000, },
  416. {B01000100, B01111101, B01111101, B01010100, B01010101, B01000101, B00000000, B00000000, },
  417. {B00000001, B01000101, B01111101, B01111100, B01000100, B00000000, B00000000, B00000000, },
  418. {B00000000, B01000100, B01111100, B01111101, B01000101, B00000001, B00000000, B00000000, },
  419. {B00000000, B01001010, B01111001, B01111001, B01001010, B00000000, B00000000, B00000000, },
  420. {B00000001, B01000101, B01111100, B01111100, B01000101, B00000001, B00000000, B00000000, },
  421. {B01001101, B01111111, B01111111, B01001101, B01000001, B01111111, B00111110, B00000000, },
  422. {B01111101, B01111101, B00011001, B00110001, B01111101, B01111101, B00000000, B00000000, },
  423. {B00000000, B00010001, B00111001, B01101101, B01101100, B00111000, B00010000, B00000000, },
  424. {B00000000, B00010000, B00111000, B01101100, B01101101, B00111001, B00010001, B00000000, },
  425. {B00000000, B00010010, B00111011, B01101101, B01101101, B00111011, B00010010, B00000000, },
  426. {B00110010, B01111011, B01001001, B01001011, B01001010, B01111011, B00110001, B00000000, },
  427. {B00000001, B00011001, B00111100, B01100110, B01100110, B00111100, B00011001, B00000001, },
  428. {B00000000, B00100010, B00110110, B00011100, B00110110, B00100010, B00000000, B00000000, },
  429. {B01011100, B00111110, B01110011, B01011001, B01101111, B00111110, B00011101, B00000000, },
  430. {B00000000, B00111101, B01111101, B01000001, B01000000, B01111100, B00111100, B00000000, },
  431. {B00011000, B00111100, B00100100, B11100111, B11100111, B00100100, B00100100, B00000000, },
  432. {B00000000, B00111100, B01111100, B01000000, B01000001, B01111101, B00111101, B00000000, },
  433. {B00000000, B00111010, B01111011, B01000001, B01000001, B01111011, B00111010, B00000000, },
  434. {B00111101, B01111101, B01000000, B01000000, B01111101, B00111101, B00000000, B00000000, },
  435. {B00000000, B00000100, B00001100, B00011000, B00110000, B01100000, B01000000, B00000000, },
  436. {B00000000, B00000000, B00000000, B00000000, B00000110, B00001110, B00001000, B00000000, },
  437. {B00000000, B00000000, B00010000, B00011110, B00001110, B00000000, B00000000, B00000000, },
  438. {B00000000, B11110000, B10011000, B10001100, B10000110, B10001100, B10011000, B11110000, },
  439. {B10000000, B00000000, B11100000, B00000000, B11111000, B00000000, B11111110, B00000000, },
  440. {B11111111, B10000000, B10000000, B10000000, B10000000, B11111111, B00000000, B00000000, },
  441. {B11111111, B10000000, B10100000, B10100000, B10000000, B11111111, B00000000, B00000000, },
  442. {B11111111, B10000000, B10101000, B10101000, B10000000, B11111111, B00000000, B00000000, },
  443. {B11111111, B10000000, B10101010, B10101010, B10000000, B11111111, B00000000, B00000000, },
  444. {B11111111, B10000000, B10111000, B10111000, B10000000, B11111111, B00000000, B00000000, },
  445. {B11111111, B10000000, B10111111, B10111111, B10000000, B11111111, B00000000, B00000000, },
  446. {B00000000, B00001100, B00011100, B01110000, B01110001, B00011101, B00001101, B00000000, },
  447. {B10000001, B11111111, B11111111, B10100101, B00100100, B00111100, B00011000, B00000000, },
  448. {B11111100, B11111110, B00101010, B00101010, B00111110, B00010100, B00000000, B00000000, },
  449. {B00100001, B01110101, B01010101, B01010100, B01111100, B01111000, B01000000, B00000000, },
  450. {B00100000, B01110100, B01010100, B01010101, B01111101, B01111001, B01000000, B00000000, },
  451. {B00000010, B00100011, B01110101, B01010101, B01010101, B01111101, B01111011, B01000010, },
  452. {B00100010, B01110111, B01010101, B01010111, B01111110, B01111011, B01000001, B00000000, },
  453. {B00100001, B01110101, B01010100, B01010100, B01111101, B01111001, B01000000, B00000000, },
  454. {B00100000, B01110100, B01010111, B01010111, B01111100, B01111000, B01000000, B00000000, },
  455. {B00100000, B01110100, B01010100, B01010100, B01111100, B01111100, B01010100, B01010100, },
  456. {B00011000, B00111100, B10100100, B10100100, B11100100, B01000000, B00000000, B00000000, },
  457. {B00111001, B01111101, B01010101, B01010100, B01011100, B00011000, B00000000, B00000000, },
  458. {B00111000, B01111100, B01010100, B01010101, B01011101, B00011001, B00000000, B00000000, },
  459. {B00000010, B00111011, B01111101, B01010101, B01010101, B01011101, B00011011, B00000010, },
  460. {B00111001, B01111101, B01010100, B01010100, B01011101, B00011001, B00000000, B00000000, },
  461. {B00000001, B01000101, B01111101, B01111100, B01000000, B00000000, B00000000, B00000000, },
  462. {B00000000, B01000100, B01111101, B01111101, B01000001, B00000000, B00000000, B00000000, },
  463. {B00000010, B00000011, B01000101, B01111101, B01111101, B01000011, B00000010, B00000000, },
  464. {B00000001, B01000101, B01111100, B01111100, B01000001, B00000001, B00000000, B00000000, },
  465. {B00100101, B01110111, B01010010, B01010111, B01111101, B00111000, B00000000, B00000000, },
  466. {B01111010, B01111010, B00001010, B00001010, B01111010, B01110000, B00000000, B00000000, },
  467. {B00110010, B01111010, B01001010, B01001000, B01111000, B00110000, B00000000, B00000000, },
  468. {B00110000, B01111000, B01001000, B01001010, B01111010, B00110010, B00000000, B00000000, },
  469. {B00110010, B01111011, B01001001, B01001001, B01111011, B00110010, B00000000, B00000000, },
  470. {B00110010, B01111011, B01001001, B01001011, B01111010, B00110011, B00000001, B00000000, },
  471. {B00110010, B01111010, B01001000, B01001000, B01111010, B00110010, B00000000, B00000000, },
  472. {B00000000, B10111000, B11111100, B01110100, B01011100, B01111110, B00111010, B00000000, },
  473. {B00111010, B01111010, B01000010, B01000000, B01111000, B01111000, B01000000, B00000000, },
  474. {B00000000, B00000110, B00011110, B01111110, B11111110, B01111110, B00011110, B00000110, },
  475. {B00111000, B01111000, B01000000, B01000010, B01111010, B01111010, B01000000, B00000000, },
  476. {B00111010, B01111011, B01000001, B01000001, B01111011, B01111010, B01000000, B00000000, },
  477. {B00111010, B01111010, B01000000, B01000000, B01111010, B01111010, B01000000, B00000000, },
  478. {B10011000, B10111000, B10100000, B10100010, B11111010, B01111010, B00000000, B00000000, }
  479.  
  480. };//0
  481. /*const PROGMEM int BitMask[][8] = {
  482. {B11111111, B11111111, B11011111, B11011111, B01000011, B11011111, B11011111, B11111111, },
  483. {B11111111, B11111111, B11011111, B11011111, B11011111, B11011111, B11111111, B11111111, },
  484. {B11111111, B11011111, B01010111, B01000011, B11001011, B01000011, B01010111, B11011111, },
  485. {B11111111, B11111111, B01100111, B10010111, B10010010, B10010111, B01100111, B11111111, },
  486. {B11111111, B11011111, B11001011, B01000011, B00000010, B01000011, B11001011, B11011111, },
  487. {B11111111, B11111111, B11101011, B11101011, B11101011, B11101011, B11111111, B11111111, },
  488. {B11111111, B11011111, B11011011, B11111011, B11011011, B11011111, B11111011, B11111111, },
  489. {B11111111, B11011111, B11111011, B11110111, B11111110, B11110111, B11111011, B11011111, },
  490. {B11111111, B11111111, B11011111, B11001011, B01100011, B00110110, B10111110, B11111111, },
  491. {B11111111, B10111110, B00110110, B01100011, B11001011, B11011111, B11111111, B11111111, },
  492. {B11111111, B11111111, B11111111, B11001011, B01000011, B00110110, B10111110, B11111111, },
  493. {B11111111, B10111110, B00110110, B01000011, B11001011, B11111111, B11111111, B11111111, },
  494. {B11111111, B11111111, B11111111, B00000010, B00000010, B10111110, B10111110, B11111111, },
  495. {B11111111, B10111110, B10111110, B00000010, B00000010, B11111111, B11111111, B11111111, },
  496. {B11111111, B11111111, B11011111, B01000011, B00100010, B10111110, B10111110, B11111111, },
  497. {B11111111, B10111110, B10111110, B00100010, B01000011, B11011111, B11111111, B11111111, },
  498. {B11111111, B00111111, B00101111, B01000010, B11111110, B11110111, B11111111, B11111111, },
  499. {B11111111, B11111111, B11111111, B01100011, B01100011, B11111111, B11111111, B11111111, },
  500. {B11111111, B11111111, B10111111, B00100011, B01100011, B11111111, B11111111, B11111111, },
  501. {B11111111, B10111111, B00001111, B01001111, B11111111, B11111111, B11111111, B11111111, },
  502. {B11111111, B11111111, B11110011, B10000010, B10000010, B11110011, B11111111, B11111111, },
  503. {B11111111, B11110111, B11110110, B10001110, B10001110, B11010010, B11110011, B11111111, },
  504. {B11111111, B11000011, B01111110, B01011010, B01011010, B01110011, B11101111, B11111111, },
  505. {B11111111, B01100111, B00000010, B10111010, B10011010, B00100010, B00110111, B10101111, },
  506. {B11111111, B11111111, B01111011, B01010111, B00010110, B01010111, B11100111, B11111111, },
  507. {B11111111, B11101011, B00000010, B00000010, B11101011, B00000010, B00000010, B11101011, },
  508. {B11111111, B11011111, B11011011, B00000011, B00000010, B00000011, B11011011, B11011111, },
  509. {B11111111, B11011111, B11001111, B01000010, B00000010, B01000010, B11001111, B11011111, },
  510. {B11111111, B11001011, B11001011, B11001011, B00000010, B01000011, B11001011, B11011111, },
  511. {B11111111, B11011111, B11001011, B01000011, B00000010, B11001011, B11001011, B11001011, },
  512. {B11111111, B00111111, B00001111, B00000011, B00000010, B00000011, B00001111, B00111111, },
  513. {B11111111, B00000010, B00000010, B01000011, B01000011, B11001011, B11001011, B11011111, },
  514. {B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, },
  515. {B11111111, B11011111, B11001011, B11001011, B01000011, B01000011, B00000010, B00000010, },
  516. {B11111111, B01000011, B10111110, B10101010, B00111110, B10101010, B10111110, B01000011, },
  517. {B11111111, B01000011, B00000010, B00010110, B10000010, B00010110, B00000010, B01000011, },
  518. {B11111111, B11010011, B11000010, B01000011, B00001011, B01000011, B11000010, B11010011, },
  519. {B11111111, B01110110, B01100110, B11001111, B11011011, B00110011, B00110111, B11111111, },
  520. {B11111111, B11011111, B11001011, B10010111, B00000010, B10010111, B11001011, B11011111, },
  521. {B11111111, B11011111, B11001011, B10000011, B00000010, B10000011, B11001011, B11011111, },
  522. {B11111111, B11111111, B11001011, B01000011, B01000011, B01000011, B11001011, B11111111, },
  523. {B00000000, B00000000, B00110100, B10111100, B10111100, B10111100, B00110100, B00000000, },
  524. {B11111111, B11111111, B11001011, B01110111, B01110111, B01110111, B11001011, B11111111, },
  525. {B00000000, B00000000, B00110100, B10001000, B10001000, B10001000, B00110100, B00000000, },
  526. {B00000000, B00000000, B00110100, B10001000, B10001000, B10001000, B00110100, B00000000, },
  527. {B11111111, B01101111, B10011111, B10011111, B01001110, B11111010, B11110110, B11010010, },
  528. {B11111111, B00111111, B00111111, B11111111, B11111111, B11111111, B11111111, B11111111, },
  529. {B11111111, B01111111, B01101111, B11001111, B11011011, B11110011, B11110111, B11111111, },
  530. {B11111111, B01000011, B00000010, B10011110, B10111010, B00000010, B01000011, B11111111, },
  531. {B11111111, B10111111, B10111011, B00000010, B00000010, B10111111, B10111111, B11111111, },
  532. {B11111111, B00110111, B00100110, B10101110, B10011110, B10010010, B10110011, B11111111, },
  533. {B11111111, B01110111, B00110110, B10011110, B10011110, B00000010, B01100011, B11111111, },
  534. {B11111111, B11001111, B11101011, B11100111, B00000010, B00000010, B11101111, B11111111, },
  535. {B11111111, B01110010, B00110010, B10111010, B10111010, B00001010, B01001110, B11111111, },
  536. {B11111111, B01000011, B00000010, B10011110, B10011110, B00000110, B01100111, B11111111, },
  537. {B11111111, B11110110, B11110110, B00101110, B00001010, B11010010, B11110110, B11111111, },
  538. {B11111111, B01100011, B00000010, B10011110, B10011110, B00000010, B01100011, B11111111, },
  539. {B11111111, B01110011, B00010010, B10011110, B10011110, B00000010, B01000011, B11111111, },
  540. {B11111111, B11111111, B01100110, B01100110, B11111111, B11111111, B11111111, B11111111, },
  541. {B11111111, B00111111, B00101111, B01000011, B11110110, B01101110, B01001110, B11000010, },
  542. {B11111111, B00010010, B00010010, B11111111, B11111111, B00010010, B00010010, B11111111, },
  543. {B11111111, B11011111, B11001011, B01010111, B11011111, B01010111, B11001011, B11011111, },
  544. {B11111111, B11011111, B11001011, B01010111, B11011111, B01010111, B11001011, B11011111, },
  545. {B11111111, B11011111, B11001011, B01010111, B11011111, B01010111, B11001011, B11011111, },
  546. {B11111111, B11111111, B11110110, B11110010, B11111111, B11110010, B11110110, B11111111, },
  547. {B11111111, B00000011, B00000010, B11011110, B11011110, B00000010, B00000011, B11111111, },
  548. {B11111111, B00000010, B00000010, B10011110, B10011110, B00000010, B01100011, B11111111, },
  549. {B11111111, B01000011, B00000010, B10111110, B10111110, B00110110, B01110111, B11111111, },
  550. {B11111111, B00000010, B00000010, B10111110, B10111110, B00000010, B01000011, B11111111, },
  551. {B11111111, B00000010, B00000010, B10011110, B10011110, B10011110, B10111110, B11111111, },
  552. {B11111111, B00000010, B00000010, B11011110, B11011110, B11011110, B11111110, B11111111, },
  553. {B11111111, B01000011, B00000010, B10111110, B10101110, B00100110, B01100111, B11111111, },
  554. {B11111111, B00000010, B00000010, B11011111, B11011111, B00000010, B00000010, B11111111, },
  555. {B11111111, B11111111, B10111110, B00000010, B00000010, B10111110, B11111111, B11111111, },
  556. {B11111111, B01101111, B00101111, B10111110, B00000010, B01000010, B11111110, B11111111, },
  557. {B11111111, B00000010, B00000010, B11001011, B01100011, B00110110, B10111110, B11111111, },
  558. {B11111111, B00000010, B00000010, B10111111, B10111111, B10111111, B10111111, B11111111, },
  559. {B11111111, B00000010, B00000010, B11110011, B11011011, B11110011, B00000010, B00000010, },
  560. {B11111111, B00000010, B00000010, B11110011, B11011011, B11001111, B00000010, B00000010, },
  561. {B11111111, B01000011, B00000010, B10111110, B10111110, B00000010, B01000011, B11111111, },
  562. {B11111111, B00000010, B00000010, B11101110, B11101110, B11000010, B11010011, B11111111, },
  563. {B11111111, B11000011, B01000010, B01111110, B01101110, B00000010, B10000011, B11111111, },
  564. {B11111111, B00000010, B00000010, B11001110, B01001110, B00010010, B10110011, B11111111, },
  565. {B11111111, B01110011, B00010010, B10011110, B10011110, B00000110, B01100111, B11111111, },
  566. {B11111111, B11110110, B11111110, B00000010, B00000010, B11111110, B11110110, B11111111, },
  567. {B11111111, B01000010, B00000010, B10111111, B10111111, B00000010, B00000010, B11111111, },
  568. {B11111111, B11000010, B01000010, B00111111, B00111111, B01000010, B11000010, B11111111, },
  569. {B11111111, B00000010, B00000010, B01101111, B11001111, B01101111, B00000010, B00000010, },
  570. {B11111111, B00110110, B00100010, B11001011, B11011111, B11001011, B00100010, B00110110, },
  571. {B11111111, B11110010, B11010010, B00001111, B00001111, B11010010, B11110010, B11111111, },
  572. {B11111111, B00111110, B00101110, B10001110, B10011010, B10110010, B10110110, B11111111, },
  573. {B11011111, B11101111, B01111111, B11101111, B11011111, B11111011, B11110111, B11111110, },
  574. {B11011111, B11001111, B01000000, B00000000, B01000000, B11001111, B11011111, B11111111, },
  575. {B11010011, B11010011, B11010011, B11010011, B01000000, B11000010, B11010011, B11111011, },
  576. {B11111011, B11110011, B00000010, B00000000, B00000010, B11110011, B11111011, B11111111, },
  577. {B11111011, B11010011, B11000010, B01000000, B11010011, B11010011, B11010011, B11010011, },
  578. {B11111111, B11110110, B11110000, B11111001, B11110000, B11110110, B11111111, B11111111, },
  579. {B11111111, B01111111, B00101011, B10101011, B10101011, B00001011, B00001111, B11111111, },
  580. {B11111111, B00000010, B00000010, B10011111, B10011111, B00001111, B01101111, B11111111, },
  581. {B11111111, B01001111, B00001011, B10111011, B10111011, B00011011, B01011111, B11111111, },
  582. {B11111111, B01101111, B00001111, B10011111, B10011111, B00000010, B00000010, B11111111, },
  583. {B11111111, B01001111, B00001011, B10101011, B10101011, B10001011, B11001111, B11111111, },
  584. {B11111111, B11101111, B00000011, B00000010, B11101110, B11100110, B11110111, B11111111, },
  585. {B11111111, B11011011, B10000011, B10100111, B10100111, B00000011, B01000011, B11111111, },
  586. {B11111111, B00000010, B00000010, B11011111, B11011111, B00001111, B00101111, B11111111, },
  587. {B11111111, B11111111, B10111111, B00000111, B00000111, B10111111, B11111111, B11111111, },
  588. {B11111111, B01101111, B00101111, B10111111, B00001010, B01001010, B11111111, B11111111, },
  589. {B11111111, B00000010, B00000010, B11101111, B01001111, B00011011, B10111011, B11111111, },
  590. {B11111111, B11111111, B11111111, B00000010, B00000010, B11111111, B11111111, B11111111, },
  591. {B11111111, B00001011, B00001011, B11001111, B00101111, B11001111, B00001011, B00001011, },
  592. {B11111111, B00001011, B00001011, B11011011, B11011011, B00001011, B00001111, B11111111, },
  593. {B11111111, B01001111, B00001011, B10111011, B10111011, B00001011, B01001111, B11111111, },
  594. {B11111111, B00000011, B00000011, B11100111, B11100111, B11000011, B11011011, B11111111, },
  595. {B11111111, B11011011, B11000011, B11100111, B00000011, B00000011, B10111111, B00111111, },
  596. {B11111111, B00001011, B00001011, B11111011, B11111011, B11001011, B11001111, B11111111, },
  597. {B11111111, B10011111, B10101011, B10101011, B10101011, B10101011, B01111011, B11111111, },
  598. {B11111111, B11011111, B11011111, B00000011, B00000011, B11011111, B11011111, B11111111, },
  599. {B11111111, B01001011, B00001011, B10111111, B10111111, B00001011, B00001011, B11111111, },
  600. {B11111111, B11001111, B01001111, B00111111, B00111111, B01001111, B11001111, B11111111, },
  601. {B11111111, B01001011, B00001011, B10111111, B00001111, B10111111, B00001011, B01001011, },
  602. {B11111111, B10111011, B00011011, B01001111, B01001111, B00011011, B10111011, B11111111, },
  603. {B11111111, B11011011, B10001011, B10101111, B10101111, B00001011, B01001011, B11111111, },
  604. {B11111111, B11111111, B00111011, B00101011, B10001011, B10011011, B11111111, B11111111, },
  605. {B01101011, B01000010, B01000000, B01111001, B01111100, B01100110, B11101111, B11111111, },
  606. {B11101000, B11100000, B00000011, B00000011, B11100000, B11101000, B11111111, B11111111, },
  607. {B01111111, B00011010, B10000000, B10100101, B00000001, B01011001, B11111100, B11111110, },
  608. {B11000011, B01111110, B10011001, B10100101, B10100101, B10111101, B01111110, B11000011, },
  609. {B11111011, B11010011, B11000110, B11101110, B11111011, B11010011, B11000110, B11101110, },
  610. {B11000011, B01111110, B10000001, B10010101, B10010101, B10101001, B01111110, B11000011, },
  611. {B11111111, B11111111, B11101011, B01110111, B00000010, B01110111, B11101011, B11111111, },
  612. {B11111111, B01110111, B01110111, B01010000, B01010000, B01110111, B01110111, B11111111, },
  613. {B11111111, B11111111, B11111010, B11110000, B11111011, B11111111, B11111111, B11111111, },
  614. {B11111111, B11111111, B11011001, B11010001, B11010100, B11011110, B11111111, B11111111, },
  615. {B11111111, B11111111, B11011101, B11010101, B11010000, B11111010, B11111111, B11111111, },
  616. {B10111111, B00000011, B01000011, B11101111, B11101111, B11000011, B11010011, B11111111, },
  617. {B11110110, B11110000, B11111001, B01000000, B01000000, B11111101, B01000000, B01000000, },
  618. {B11101110, B11000110, B11010011, B11111011, B11101110, B11000110, B11010011, B11111011, },
  619. {B00110000, B00100100, B11001011, B11011011, B01100011, B01000010, B01001100, B01001001, },
  620. {B01110000, B01100000, B11001111, B11011011, B00110011, B00100010, B10001000, B10011101, },
  621. {B11010101, B01010101, B01101010, B11001111, B11011011, B01100011, B01010110, B00001010, },
  622. {B11001111, B01001011, B01110001, B01110101, B01101111, B11101111, B11111111, B11111111, },
  623. {B01001101, B01001001, B11100001, B11100111, B11100011, B01001011, B01001111, B11111111, },
  624. {B01001111, B01001011, B11100011, B11100111, B11100001, B01001001, B01001101, B11111111, },
  625. {B01001111, B01001010, B11101000, B11101001, B11101000, B01001010, B01001111, B11111111, },
  626. {B01001110, B01001000, B11101001, B11101000, B11101010, B01001000, B01001101, B11111111, },
  627. {B01001001, B01000001, B11010110, B11011110, B11010110, B01000001, B01001001, B11111111, },
  628. {B01001111, B01001011, B11101000, B11101000, B01001011, B01001111, B11111111, B11111111, },
  629. {B01000011, B01000010, B11111000, B11111001, B01000000, B01000000, B01111001, B11111111, },
  630. {B11110010, B10010000, B10011101, B10001101, B00001000, B01111010, B11111111, B11111111, },
  631. {B01110101, B01000001, B01000001, B01010111, B01010111, B01110111, B11111111, B11111111, },
  632. {B01110111, B01000011, B01000011, B01010101, B01010101, B01110101, B11111111, B11111111, },
  633. {B01110111, B01000010, B01000001, B01010101, B01010110, B01110111, B11111111, B11111111, },
  634. {B01110111, B01000001, B01000001, B01010111, B01010101, B01110101, B11111111, B11111111, },
  635. {B11111101, B01110101, B01000001, B01000011, B01110111, B11111111, B11111111, B11111111, },
  636. {B11111111, B01110111, B01000011, B01000001, B01110101, B11111101, B11111111, B11111111, },
  637. {B11111111, B01111010, B01001001, B01001001, B01111010, B11111111, B11111111, B11111111, },
  638. {B11111101, B01110101, B01000011, B01000011, B01110101, B11111101, B11111111, B11111111, },
  639. {B01110001, B01000000, B01000000, B01110001, B01111101, B01000000, B11000010, B11111111, },
  640. {B01000001, B01000001, B11011001, B11001101, B01000001, B01000001, B11111111, B11111111, },
  641. {B11111111, B11011101, B11001001, B01100001, B01100011, B11001011, B11011111, B11111111, },
  642. {B11111111, B11011111, B11001011, B01100011, B01100001, B11001001, B11011101, B11111111, },
  643. {B11111111, B11011110, B11001000, B01100001, B01100001, B11001000, B11011110, B11111111, },
  644. {B11001110, B01001000, B01111001, B01111000, B01111010, B01001000, B11001101, B11111111, },
  645. {B11111101, B11011001, B11000011, B01100110, B01100110, B11000011, B11011001, B11111101, },
  646. {B11111111, B11101110, B11000110, B11010011, B11000110, B11101110, B11111111, B11111111, },
  647. {B01010011, B11000010, B01001100, B01011001, B01100000, B11000010, B11010001, B11111111, },
  648. {B11111111, B11000001, B01000001, B01111101, B01111111, B01000011, B11000011, B11111111, },
  649. {B11011011, B11000011, B11100111, B00100100, B00100100, B11100111, B11100111, B11111111, },
  650. {B11111111, B11000011, B01000011, B01111111, B01111101, B01000001, B11000001, B11111111, },
  651. {B11111111, B11001010, B01001000, B01111101, B01111101, B01001000, B11001010, B11111111, },
  652. {B11000001, B01000001, B01111111, B01111111, B01000001, B11000001, B11111111, B11111111, },
  653. {B11111111, B11110111, B11110011, B11011011, B11001111, B01101111, B01111111, B11111111, },
  654. {B11111111, B11111111, B11111111, B11111111, B11110110, B11110010, B11111011, B11111111, },
  655. {B11111111, B11111111, B11011111, B11010010, B11110010, B11111111, B11111111, B11111111, },
  656. {B11111111, B00001111, B10011011, B10110011, B10110110, B10110011, B10011011, B00001111, },
  657. {B10111111, B11111111, B00101111, B11111111, B00001011, B11111111, B00000010, B11111111, },
  658. {B00000000, B10111111, B10111111, B10111111, B10111111, B00000000, B11111111, B11111111, },
  659. {B00000000, B10111111, B10101111, B10101111, B10111111, B00000000, B11111111, B11111111, },
  660. {B00000000, B10111111, B10101011, B10101011, B10111111, B00000000, B11111111, B11111111, },
  661. {B00000000, B10111111, B10101010, B10101010, B10111111, B00000000, B11111111, B11111111, },
  662. {B00000000, B10111111, B10001011, B10001011, B10111111, B00000000, B11111111, B11111111, },
  663. {B00000000, B10111111, B10000000, B10000000, B10111111, B00000000, B11111111, B11111111, },
  664. {B11111111, B11110011, B11010011, B01001111, B01001101, B11010001, B11110001, B11111111, },
  665. {B10111101, B00000000, B00000000, B10100101, B11100111, B11000011, B11011011, B11111111, },
  666. {B00000011, B00000010, B11101010, B11101010, B11000010, B11010111, B11111111, B11111111, },
  667. {B11101101, B01000101, B01010101, B01010111, B01000011, B01001011, B01111111, B11111111, },
  668. {B11101111, B01000111, B01010111, B01010101, B01000001, B01001001, B01111111, B11111111, },
  669. {B11111110, B11101100, B01000101, B01010101, B01010101, B01000001, B01001000, B01111110, },
  670. {B11101110, B01000100, B01010101, B01010100, B01000010, B01001000, B01111101, B11111111, },
  671. {B11101101, B01000101, B01010111, B01010111, B01000001, B01001001, B01111111, B11111111, },
  672. {B11101111, B01000111, B01010100, B01010100, B01000011, B01001011, B01111111, B11111111, },
  673. {B11101111, B01000111, B01010111, B01010111, B01000011, B01000011, B01010111, B01010111, },
  674. {B11011011, B11000011, B10100111, B10100111, B00100111, B01111111, B11111111, B11111111, },
  675. {B11001001, B01000001, B01010101, B01010111, B01010011, B11011011, B11111111, B11111111, },
  676. {B11001011, B01000011, B01010111, B01010101, B01010001, B11011001, B11111111, B11111111, },
  677. {B11111110, B11001000, B01000001, B01010101, B01010101, B01010001, B11011000, B11111110, },
  678. {B11001001, B01000001, B01010111, B01010111, B01010001, B11011001, B11111111, B11111111, },
  679. {B11111101, B01110101, B01000001, B01000011, B01111111, B11111111, B11111111, B11111111, },
  680. {B11111111, B01110111, B01000001, B01000001, B01111101, B11111111, B11111111, B11111111, },
  681. {B11111110, B11111100, B01110101, B01000001, B01000001, B01111100, B11111110, B11111111, },
  682. {B11111101, B01110101, B01000011, B01000011, B01111101, B11111101, B11111111, B11111111, },
  683. {B11100101, B01000100, B01011110, B01010100, B01000001, B11001011, B11111111, B11111111, },
  684. {B01001010, B01001010, B11111010, B11111010, B01001010, B01001111, B11111111, B11111111, },
  685. {B11001110, B01001010, B01111010, B01111011, B01001011, B11001111, B11111111, B11111111, },
  686. {B11001111, B01001011, B01111011, B01111010, B01001010, B11001110, B11111111, B11111111, },
  687. {B11001110, B01001000, B01111001, B01111001, B01001000, B11001110, B11111111, B11111111, },
  688. {B11001110, B01001000, B01111001, B01111000, B01001010, B11001100, B11111101, B11111111, },
  689. {B11001110, B01001010, B01111011, B01111011, B01001010, B11001110, B11111111, B11111111, },
  690. {B11111111, B10001011, B00000011, B01000111, B01010011, B01000010, B11001010, B11111111, },
  691. {B11001010, B01001010, B01111110, B01111111, B01001011, B01001011, B01111111, B11111111, },
  692. {B11111111, B11110110, B11010010, B01000010, B00000010, B01000010, B11010010, B11110110, },
  693. {B11001011, B01001011, B01111111, B01111110, B01001010, B01001010, B01111111, B11111111, },
  694. {B11001010, B01001000, B01111101, B01111101, B01001000, B01001010, B01111111, B11111111, },
  695. {B11001010, B01001010, B01111111, B01111111, B01001010, B01001010, B01111111, B11111111, },
  696. {B10011011, B10001011, B10101111, B10101110, B00001010, B01001010, B11111111, B11111111, },
  697. };*/
  698. const PROGMEM int BitMask[][8] = {
  699. {11111111, 11111111, 11011111, 11011111, 01000011, 11011111, 11011111, 11111111, },
  700. {11111111, 11111111, 11011111, 11011111, 11011111, 11011111, 11111111, 11111111, },
  701. {11111111, 11011111, 01010111, 01000011, 11001011, 01000011, 01010111, 11011111, },
  702. {11111111, 11111111, 01100111, 10010111, 10010010, 10010111, 01100111, 11111111, },
  703. {11111111, 11011111, 11001011, 01000011, 00000010, 01000011, 11001011, 11011111, },
  704. {11111111, 11111111, 11101011, 11101011, 11101011, 11101011, 11111111, 11111111, },
  705. {11111111, 11011111, 11011011, 11111011, 11011011, 11011111, 11111011, 11111111, },
  706. {11111111, 11011111, 11111011, 11110111, 11111110, 11110111, 11111011, 11011111, },
  707. {11111111, 11111111, 11011111, 11001011, 01100011, 00110110, 10111110, 11111111, },
  708. {11111111, 10111110, 00110110, 01100011, 11001011, 11011111, 11111111, 11111111, },
  709. {11111111, 11111111, 11111111, 11001011, 01000011, 00110110, 10111110, 11111111, },
  710. {11111111, 10111110, 00110110, 01000011, 11001011, 11111111, 11111111, 11111111, },
  711. {11111111, 11111111, 11111111, 00000010, 00000010, 10111110, 10111110, 11111111, },
  712. {11111111, 10111110, 10111110, 00000010, 00000010, 11111111, 11111111, 11111111, },
  713. {11111111, 11111111, 11011111, 01000011, 00100010, 10111110, 10111110, 11111111, },
  714. {11111111, 10111110, 10111110, 00100010, 01000011, 11011111, 11111111, 11111111, },
  715. {11111111, 00111111, 00101111, 01000010, 11111110, 11110111, 11111111, 11111111, },
  716. {11111111, 11111111, 11111111, 01100011, 01100011, 11111111, 11111111, 11111111, },
  717. {11111111, 11111111, 10111111, 00100011, 01100011, 11111111, 11111111, 11111111, },
  718. {11111111, 10111111, 00001111, 01001111, 11111111, 11111111, 11111111, 11111111, },
  719. {11111111, 11111111, 11110011, 10000010, 10000010, 11110011, 11111111, 11111111, },
  720. {11111111, 11110111, 11110110, 10001110, 10001110, 11010010, 11110011, 11111111, },
  721. {11111111, 11000011, 01111110, 01011010, 01011010, 01110011, 11101111, 11111111, },
  722. {11111111, 01100111, 00000010, 10111010, 10011010, 00100010, 00110111, 10101111, },
  723. {11111111, 11111111, 01111011, 01010111, 00010110, 01010111, 11100111, 11111111, },
  724. {11111111, 11101011, 00000010, 00000010, 11101011, 00000010, 00000010, 11101011, },
  725. {11111111, 11011111, 11011011, 00000011, 00000010, 00000011, 11011011, 11011111, },
  726. {11111111, 11011111, 11001111, 01000010, 00000010, 01000010, 11001111, 11011111, },
  727. {11111111, 11001011, 11001011, 11001011, 00000010, 01000011, 11001011, 11011111, },
  728. {11111111, 11011111, 11001011, 01000011, 00000010, 11001011, 11001011, 11001011, },
  729. {11111111, 00111111, 00001111, 00000011, 00000010, 00000011, 00001111, 00111111, },
  730. {11111111, 00000010, 00000010, 01000011, 01000011, 11001011, 11001011, 11011111, },
  731. {11111111, 11111111, 11111111, 11111111, 11111111, 11111111, 11111111, 11111111, },
  732. {11111111, 11011111, 11001011, 11001011, 01000011, 01000011, 00000010, 00000010, },
  733. {11111111, 01000011, 10111110, 10101010, 00111110, 10101010, 10111110, 01000011, },
  734. {11111111, 01000011, 00000010, 00010110, 10000010, 00010110, 00000010, 01000011, },
  735. {11111111, 11010011, 11000010, 01000011, 00001011, 01000011, 11000010, 11010011, },
  736. {11111111, 01110110, 01100110, 11001111, 11011011, 00110011, 00110111, 11111111, },
  737. {11111111, 11011111, 11001011, 10010111, 00000010, 10010111, 11001011, 11011111, },
  738. {11111111, 11011111, 11001011, 10000011, 00000010, 10000011, 11001011, 11011111, },
  739. {11111111, 11111111, 11001011, 01000011, 01000011, 01000011, 11001011, 11111111, },
  740. {00000000, 00000000, 00110100, 10111100, 10111100, 10111100, 00110100, 00000000, },
  741. {11111111, 11111111, 11001011, 01110111, 01110111, 01110111, 11001011, 11111111, },
  742. {00000000, 00000000, 00110100, 10001000, 10001000, 10001000, 00110100, 00000000, },
  743. {00000000, 00000000, 00110100, 10001000, 10001000, 10001000, 00110100, 00000000, },
  744. {11111111, 01101111, 10011111, 10011111, 01001110, 11111010, 11110110, 11010010, },
  745. {11111111, 00111111, 00111111, 11111111, 11111111, 11111111, 11111111, 11111111, },
  746. {11111111, 01111111, 01101111, 11001111, 11011011, 11110011, 11110111, 11111111, },
  747. {11111111, 01000011, 00000010, 10011110, 10111010, 00000010, 01000011, 11111111, },
  748. {11111111, 10111111, 10111011, 00000010, 00000010, 10111111, 10111111, 11111111, },
  749. {11111111, 00110111, 00100110, 10101110, 10011110, 10010010, 10110011, 11111111, },
  750. {11111111, 01110111, 00110110, 10011110, 10011110, 00000010, 01100011, 11111111, },
  751. {11111111, 11001111, 11101011, 11100111, 00000010, 00000010, 11101111, 11111111, },
  752. {11111111, 01110010, 00110010, 10111010, 10111010, 00001010, 01001110, 11111111, },
  753. {11111111, 01000011, 00000010, 10011110, 10011110, 00000110, 01100111, 11111111, },
  754. {11111111, 11110110, 11110110, 00101110, 00001010, 11010010, 11110110, 11111111, },
  755. {11111111, 01100011, 00000010, 10011110, 10011110, 00000010, 01100011, 11111111, },
  756. {11111111, 01110011, 00010010, 10011110, 10011110, 00000010, 01000011, 11111111, },
  757. {11111111, 11111111, 01100110, 01100110, 11111111, 11111111, 11111111, 11111111, },
  758. {11111111, 00111111, 00101111, 01000011, 11110110, 01101110, 01001110, 11000010, },
  759. {11111111, 00010010, 00010010, 11111111, 11111111, 00010010, 00010010, 11111111, },
  760. {11111111, 11011111, 11001011, 01010111, 11011111, 01010111, 11001011, 11011111, },
  761. {11111111, 11011111, 11001011, 01010111, 11011111, 01010111, 11001011, 11011111, },
  762. {11111111, 11011111, 11001011, 01010111, 11011111, 01010111, 11001011, 11011111, },
  763. {11111111, 11111111, 11110110, 11110010, 11111111, 11110010, 11110110, 11111111, },
  764. {11111111, 00000011, 00000010, 11011110, 11011110, 00000010, 00000011, 11111111, },
  765. {11111111, 00000010, 00000010, 10011110, 10011110, 00000010, 01100011, 11111111, },
  766. {11111111, 01000011, 00000010, 10111110, 10111110, 00110110, 01110111, 11111111, },
  767. {11111111, 00000010, 00000010, 10111110, 10111110, 00000010, 01000011, 11111111, },
  768. {11111111, 00000010, 00000010, 10011110, 10011110, 10011110, 10111110, 11111111, },
  769. {11111111, 00000010, 00000010, 11011110, 11011110, 11011110, 11111110, 11111111, },
  770. {11111111, 01000011, 00000010, 10111110, 10101110, 00100110, 01100111, 11111111, },
  771. {11111111, 00000010, 00000010, 11011111, 11011111, 00000010, 00000010, 11111111, },
  772. {11111111, 11111111, 10111110, 00000010, 00000010, 10111110, 11111111, 11111111, },
  773. {11111111, 01101111, 00101111, 10111110, 00000010, 01000010, 11111110, 11111111, },
  774. {11111111, 00000010, 00000010, 11001011, 01100011, 00110110, 10111110, 11111111, },
  775. {11111111, 00000010, 00000010, 10111111, 10111111, 10111111, 10111111, 11111111, },
  776. {11111111, 00000010, 00000010, 11110011, 11011011, 11110011, 00000010, 00000010, },
  777. {11111111, 00000010, 00000010, 11110011, 11011011, 11001111, 00000010, 00000010, },
  778. {11111111, 01000011, 00000010, 10111110, 10111110, 00000010, 01000011, 11111111, },
  779. {11111111, 00000010, 00000010, 11101110, 11101110, 11000010, 11010011, 11111111, },
  780. {11111111, 11000011, 01000010, 01111110, 01101110, 00000010, 10000011, 11111111, },
  781. {11111111, 00000010, 00000010, 11001110, 01001110, 00010010, 10110011, 11111111, },
  782. {11111111, 01110011, 00010010, 10011110, 10011110, 00000110, 01100111, 11111111, },
  783. {11111111, 11110110, 11111110, 00000010, 00000010, 11111110, 11110110, 11111111, },
  784. {11111111, 01000010, 00000010, 10111111, 10111111, 00000010, 00000010, 11111111, },
  785. {11111111, 11000010, 01000010, 00111111, 00111111, 01000010, 11000010, 11111111, },
  786. {11111111, 00000010, 00000010, 01101111, 11001111, 01101111, 00000010, 00000010, },
  787. {11111111, 00110110, 00100010, 11001011, 11011111, 11001011, 00100010, 00110110, },
  788. {11111111, 11110010, 11010010, 00001111, 00001111, 11010010, 11110010, 11111111, },
  789. {11111111, 00111110, 00101110, 10001110, 10011010, 10110010, 10110110, 11111111, },
  790. {11011111, 11101111, 01111111, 11101111, 11011111, 11111011, 11110111, 11111110, },
  791. {11011111, 11001111, 01000000, 00000000, 01000000, 11001111, 11011111, 11111111, },
  792. {11010011, 11010011, 11010011, 11010011, 01000000, 11000010, 11010011, 11111011, },
  793. {11111011, 11110011, 00000010, 00000000, 00000010, 11110011, 11111011, 11111111, },
  794. {11111011, 11010011, 11000010, 01000000, 11010011, 11010011, 11010011, 11010011, },
  795. {11111111, 11110110, 11110000, 11111001, 11110000, 11110110, 11111111, 11111111, },
  796. {11111111, 01111111, 00101011, 10101011, 10101011, 00001011, 00001111, 11111111, },
  797. {11111111, 00000010, 00000010, 10011111, 10011111, 00001111, 01101111, 11111111, },
  798. {11111111, 01001111, 00001011, 10111011, 10111011, 00011011, 01011111, 11111111, },
  799. {11111111, 01101111, 00001111, 10011111, 10011111, 00000010, 00000010, 11111111, },
  800. {11111111, 01001111, 00001011, 10101011, 10101011, 10001011, 11001111, 11111111, },
  801. {11111111, 11101111, 00000011, 00000010, 11101110, 11100110, 11110111, 11111111, },
  802. {11111111, 11011011, 10000011, 10100111, 10100111, 00000011, 01000011, 11111111, },
  803. {11111111, 00000010, 00000010, 11011111, 11011111, 00001111, 00101111, 11111111, },
  804. {11111111, 11111111, 10111111, 00000111, 00000111, 10111111, 11111111, 11111111, },
  805. {11111111, 01101111, 00101111, 10111111, 00001010, 01001010, 11111111, 11111111, },
  806. {11111111, 00000010, 00000010, 11101111, 01001111, 00011011, 10111011, 11111111, },
  807. {11111111, 11111111, 11111111, 00000010, 00000010, 11111111, 11111111, 11111111, },
  808. {11111111, 00001011, 00001011, 11001111, 00101111, 11001111, 00001011, 00001011, },
  809. {11111111, 00001011, 00001011, 11011011, 11011011, 00001011, 00001111, 11111111, },
  810. {11111111, 01001111, 00001011, 10111011, 10111011, 00001011, 01001111, 11111111, },
  811. {11111111, 00000011, 00000011, 11100111, 11100111, 11000011, 11011011, 11111111, },
  812. {11111111, 11011011, 11000011, 11100111, 00000011, 00000011, 10111111, 00111111, },
  813. {11111111, 00001011, 00001011, 11111011, 11111011, 11001011, 11001111, 11111111, },
  814. {11111111, 10011111, 10101011, 10101011, 10101011, 10101011, 01111011, 11111111, },
  815. {11111111, 11011111, 11011111, 00000011, 00000011, 11011111, 11011111, 11111111, },
  816. {11111111, 01001011, 00001011, 10111111, 10111111, 00001011, 00001011, 11111111, },
  817. {11111111, 11001111, 01001111, 00111111, 00111111, 01001111, 11001111, 11111111, },
  818. {11111111, 01001011, 00001011, 10111111, 00001111, 10111111, 00001011, 01001011, },
  819. {11111111, 10111011, 00011011, 01001111, 01001111, 00011011, 10111011, 11111111, },
  820. {11111111, 11011011, 10001011, 10101111, 10101111, 00001011, 01001011, 11111111, },
  821. {11111111, 11111111, 00111011, 00101011, 10001011, 10011011, 11111111, 11111111, },
  822. {01101011, 01000010, 01000000, 01111001, 01111100, 01100110, 11101111, 11111111, },
  823. {11101000, 11100000, 00000011, 00000011, 11100000, 11101000, 11111111, 11111111, },
  824. {01111111, 00011010, 10000000, 10100101, 00000001, 01011001, 11111100, 11111110, },
  825. {11000011, 01111110, 10011001, 10100101, 10100101, 10111101, 01111110, 11000011, },
  826. {11111011, 11010011, 11000110, 11101110, 11111011, 11010011, 11000110, 11101110, },
  827. {11000011, 01111110, 10000001, 10010101, 10010101, 10101001, 01111110, 11000011, },
  828. {11111111, 11111111, 11101011, 01110111, 00000010, 01110111, 11101011, 11111111, },
  829. {11111111, 01110111, 01110111, 01010000, 01010000, 01110111, 01110111, 11111111, },
  830. {11111111, 11111111, 11111010, 11110000, 11111011, 11111111, 11111111, 11111111, },
  831. {11111111, 11111111, 11011001, 11010001, 11010100, 11011110, 11111111, 11111111, },
  832. {11111111, 11111111, 11011101, 11010101, 11010000, 11111010, 11111111, 11111111, },
  833. {10111111, 00000011, 01000011, 11101111, 11101111, 11000011, 11010011, 11111111, },
  834. {11110110, 11110000, 11111001, 01000000, 01000000, 11111101, 01000000, 01000000, },
  835. {11101110, 11000110, 11010011, 11111011, 11101110, 11000110, 11010011, 11111011, },
  836. {00110000, 00100100, 11001011, 11011011, 01100011, 01000010, 01001100, 01001001, },
  837. {01110000, 01100000, 11001111, 11011011, 00110011, 00100010, 10001000, 10011101, },
  838. {11010101, 01010101, 01101010, 11001111, 11011011, 01100011, 01010110, 00001010, },
  839. {11001111, 01001011, 01110001, 01110101, 01101111, 11101111, 11111111, 11111111, },
  840. {01001101, 01001001, 11100001, 11100111, 11100011, 01001011, 01001111, 11111111, },
  841. {01001111, 01001011, 11100011, 11100111, 11100001, 01001001, 01001101, 11111111, },
  842. {01001111, 01001010, 11101000, 11101001, 11101000, 01001010, 01001111, 11111111, },
  843. {01001110, 01001000, 11101001, 11101000, 11101010, 01001000, 01001101, 11111111, },
  844. {01001001, 01000001, 11010110, 11011110, 11010110, 01000001, 01001001, 11111111, },
  845. {01001111, 01001011, 11101000, 11101000, 01001011, 01001111, 11111111, 11111111, },
  846. {01000011, 01000010, 11111000, 11111001, 01000000, 01000000, 01111001, 11111111, },
  847. {11110010, 10010000, 10011101, 10001101, 00001000, 01111010, 11111111, 11111111, },
  848. {01110101, 01000001, 01000001, 01010111, 01010111, 01110111, 11111111, 11111111, },
  849. {01110111, 01000011, 01000011, 01010101, 01010101, 01110101, 11111111, 11111111, },
  850. {01110111, 01000010, 01000001, 01010101, 01010110, 01110111, 11111111, 11111111, },
  851. {01110111, 01000001, 01000001, 01010111, 01010101, 01110101, 11111111, 11111111, },
  852. {11111101, 01110101, 01000001, 01000011, 01110111, 11111111, 11111111, 11111111, },
  853. {11111111, 01110111, 01000011, 01000001, 01110101, 11111101, 11111111, 11111111, },
  854. {11111111, 01111010, 01001001, 01001001, 01111010, 11111111, 11111111, 11111111, },
  855. {11111101, 01110101, 01000011, 01000011, 01110101, 11111101, 11111111, 11111111, },
  856. {01110001, 01000000, 01000000, 01110001, 01111101, 01000000, 11000010, 11111111, },
  857. {01000001, 01000001, 11011001, 11001101, 01000001, 01000001, 11111111, 11111111, },
  858. {11111111, 11011101, 11001001, 01100001, 01100011, 11001011, 11011111, 11111111, },
  859. {11111111, 11011111, 11001011, 01100011, 01100001, 11001001, 11011101, 11111111, },
  860. {11111111, 11011110, 11001000, 01100001, 01100001, 11001000, 11011110, 11111111, },
  861. {11001110, 01001000, 01111001, 01111000, 01111010, 01001000, 11001101, 11111111, },
  862. {11111101, 11011001, 11000011, 01100110, 01100110, 11000011, 11011001, 11111101, },
  863. {11111111, 11101110, 11000110, 11010011, 11000110, 11101110, 11111111, 11111111, },
  864. {01010011, 11000010, 01001100, 01011001, 01100000, 11000010, 11010001, 11111111, },
  865. {11111111, 11000001, 01000001, 01111101, 01111111, 01000011, 11000011, 11111111, },
  866. {11011011, 11000011, 11100111, 00100100, 00100100, 11100111, 11100111, 11111111, },
  867. {11111111, 11000011, 01000011, 01111111, 01111101, 01000001, 11000001, 11111111, },
  868. {11111111, 11001010, 01001000, 01111101, 01111101, 01001000, 11001010, 11111111, },
  869. {11000001, 01000001, 01111111, 01111111, 01000001, 11000001, 11111111, 11111111, },
  870. {11111111, 11110111, 11110011, 11011011, 11001111, 01101111, 01111111, 11111111, },
  871. {11111111, 11111111, 11111111, 11111111, 11110110, 11110010, 11111011, 11111111, },
  872. {11111111, 11111111, 11011111, 11010010, 11110010, 11111111, 11111111, 11111111, },
  873. {11111111, 00001111, 10011011, 10110011, 10110110, 10110011, 10011011, 00001111, },
  874. {10111111, 11111111, 00101111, 11111111, 00001011, 11111111, 00000010, 11111111, },
  875. {00000000, 10111111, 10111111, 10111111, 10111111, 00000000, 11111111, 11111111, },
  876. {00000000, 10111111, 10101111, 10101111, 10111111, 00000000, 11111111, 11111111, },
  877. {00000000, 10111111, 10101011, 10101011, 10111111, 00000000, 11111111, 11111111, },
  878. {00000000, 10111111, 10101010, 10101010, 10111111, 00000000, 11111111, 11111111, },
  879. {00000000, 10111111, 10001011, 10001011, 10111111, 00000000, 11111111, 11111111, },
  880. {00000000, 10111111, 10000000, 10000000, 10111111, 00000000, 11111111, 11111111, },
  881. {11111111, 11110011, 11010011, 01001111, 01001101, 11010001, 11110001, 11111111, },
  882. {10111101, 00000000, 00000000, 10100101, 11100111, 11000011, 11011011, 11111111, },
  883. {00000011, 00000010, 11101010, 11101010, 11000010, 11010111, 11111111, 11111111, },
  884. {11101101, 01000101, 01010101, 01010111, 01000011, 01001011, 01111111, 11111111, },
  885. {11101111, 01000111, 01010111, 01010101, 01000001, 01001001, 01111111, 11111111, },
  886. {11111110, 11101100, 01000101, 01010101, 01010101, 01000001, 01001000, 01111110, },
  887. {11101110, 01000100, 01010101, 01010100, 01000010, 01001000, 01111101, 11111111, },
  888. {11101101, 01000101, 01010111, 01010111, 01000001, 01001001, 01111111, 11111111, },
  889. {11101111, 01000111, 01010100, 01010100, 01000011, 01001011, 01111111, 11111111, },
  890. {11101111, 01000111, 01010111, 01010111, 01000011, 01000011, 01010111, 01010111, },
  891. {11011011, 11000011, 10100111, 10100111, 00100111, 01111111, 11111111, 11111111, },
  892. {11001001, 01000001, 01010101, 01010111, 01010011, 11011011, 11111111, 11111111, },
  893. {11001011, 01000011, 01010111, 01010101, 01010001, 11011001, 11111111, 11111111, },
  894. {11111110, 11001000, 01000001, 01010101, 01010101, 01010001, 11011000, 11111110, },
  895. {11001001, 01000001, 01010111, 01010111, 01010001, 11011001, 11111111, 11111111, },
  896. {11111101, 01110101, 01000001, 01000011, 01111111, 11111111, 11111111, 11111111, },
  897. {11111111, 01110111, 01000001, 01000001, 01111101, 11111111, 11111111, 11111111, },
  898. {11111110, 11111100, 01110101, 01000001, 01000001, 01111100, 11111110, 11111111, },
  899. {11111101, 01110101, 01000011, 01000011, 01111101, 11111101, 11111111, 11111111, },
  900. {11100101, 01000100, 01011110, 01010100, 01000001, 11001011, 11111111, 11111111, },
  901. {01001010, 01001010, 11111010, 11111010, 01001010, 01001111, 11111111, 11111111, },
  902. {11001110, 01001010, 01111010, 01111011, 01001011, 11001111, 11111111, 11111111, },
  903. {11001111, 01001011, 01111011, 01111010, 01001010, 11001110, 11111111, 11111111, },
  904. {11001110, 01001000, 01111001, 01111001, 01001000, 11001110, 11111111, 11111111, },
  905. {11001110, 01001000, 01111001, 01111000, 01001010, 11001100, 11111101, 11111111, },
  906. {11001110, 01001010, 01111011, 01111011, 01001010, 11001110, 11111111, 11111111, },
  907. {11111111, 10001011, 00000011, 01000111, 01010011, 01000010, 11001010, 11111111, },
  908. {11001010, 01001010, 01111110, 01111111, 01001011, 01001011, 01111111, 11111111, },
  909. {11111111, 11110110, 11010010, 01000010, 00000010, 01000010, 11010010, 11110110, },
  910. {11001011, 01001011, 01111111, 01111110, 01001010, 01001010, 01111111, 11111111, },
  911. {11001010, 01001000, 01111101, 01111101, 01001000, 01001010, 01111111, 11111111, },
  912. {11001010, 01001010, 01111111, 01111111, 01001010, 01001010, 01111111, 11111111, },
  913. {10011011, 10001011, 10101111, 10101110, 00001010, 01001010, 11111111, 11111111, },
  914. };
  915.  
  916. const int CharData_LEN = sizeof(CharData) / 8;
  917. SimpleDHT11 dht11;
  918. // Set pins: CE, IO,CLK
  919. DS1302RTC RTC(9, 10, 11);
  920. void setup()
  921. {
  922. Serial.begin(115200); // open the serial port at 9600 bps:
  923. for (i = 0; i <= 7; i++)
  924. {
  925. pinMode(columnArray[i], OUTPUT); // Set column pins as output
  926. pinMode(DriversPins[i], OUTPUT); // Set column pins as output
  927. digitalWrite (DriversPins[i], LOW);
  928. }
  929. for (i = 0; i <= 19; i++)
  930. { // Set row pins as output
  931. pinMode(rowArray[i], OUTPUT);
  932. }
  933. Serial.println("DS1302RTC Read Test");
  934. Serial.println("-------------------");
  935. Serial.println("RTC module activated");
  936. Serial.println();
  937. delay(500);
  938.  
  939. if (RTC.haltRTC()) {
  940. Serial.println("The DS1302 is stopped. Please run the SetTime");
  941. Serial.println("example to initialize the time and begin running.");
  942. Serial.println();
  943. }
  944. if (!RTC.writeEN()) {
  945. Serial.println("The DS1302 is write protected. This normal.");
  946. Serial.println();
  947. }
  948. // setTime(int(tm.Hour),int(tm.Minute),int(tm.Second),int(tm.Month),int(tm.Day),int(tm.Year)); // Synchronize internal time to RTC
  949. Serial.print(RTC.get());
  950. setSyncProvider(RTC.get);
  951. t = now();
  952. setTime(t);
  953.  
  954. }
  955. void loop()
  956. {
  957. /*for (int z = 0; z <= 7; z++)
  958. {
  959. DriverChange(z,1);
  960. delay(500);
  961. DriverChange(z,0);
  962. delay(500);
  963. }*/
  964. PSA(1);
  965. //PSA(2);
  966. //PSA(3);
  967. //Cron(hour(t), minute(t), second(t));
  968. //RunDHT();
  969. //ConvertMsg();
  970. //DisplayMessage();
  971. //UpdateTime();
  972. //ShowTime();
  973. //ShowDate();
  974. }
  975. void DriverChange(int Channel, int State){
  976. if (State == 0){
  977. digitalWrite (DriversPins[Channel], LOW);
  978. }else{
  979. digitalWrite (DriversPins[Channel], HIGH);
  980. }
  981. }
  982. void UpdateTime() {
  983. Serial.print(RTC.get());
  984. setSyncProvider(RTC.get);
  985. t = now();
  986. setTime(t);
  987. }
  988. void ShowTime() {
  989. String Msg;
  990. String HH = String(hourFormat12(t));
  991. String MM = String(minute(t), DEC);
  992. String SS = String(second(t), DEC);
  993. String PM = String("PM");
  994. String AM = String("AM");
  995. if (isAM(t) != true) {
  996. Msg = String(" Time: " + HH + ":" + MM + ":" + SS + " " + PM + " ");
  997. } else {
  998. Msg = String(" Time: " + HH + ":" + MM + ":" + SS + " " + AM + " ");
  999. }
  1000. ConvertMsg(Msg);
  1001. }
  1002. void ShowDate() {
  1003. String Msg;
  1004. String MM = String(month(t), DEC);
  1005. String DD = String(day(t), DEC);
  1006. String YY = String(year(t), DEC);
  1007. //String DN = String(tm.Wday);
  1008. Msg = String(" Date: " + MM + "/" + DD + "/" + YY + " ");
  1009. ConvertMsg(Msg);
  1010. }
  1011. void ShowDHT() {
  1012. if (DHT11Temp != 0) {
  1013. CreateDHTMessageT();
  1014. CreateDHTMessageH();
  1015. }
  1016. }
  1017. void RunDHT() {
  1018. ReadDHT();
  1019. if (DHT11Temp != 0) {
  1020. CreateDHTMessageT();
  1021. CreateDHTMessageH();
  1022. } else {
  1023. for (int j = 0; j <= 7; j++) // ByteRowLoop
  1024. {
  1025. delay(1000);
  1026. ReadDHT();
  1027. if (DHT11Temp != 0) {
  1028. j = 10;
  1029. }
  1030. }
  1031. }
  1032. }
  1033. void ReadDHT() {
  1034. // start working...
  1035. Serial.println("=================================");
  1036. Serial.println("Sample DHT11...");
  1037.  
  1038. // read without samples.
  1039. //byte temperature = 0, humidity = 0;
  1040. int err = SimpleDHTErrSuccess;
  1041. if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
  1042. //Serial.print("Read DHT11 failed, err="); Serial.println(err); delay(1000);
  1043. //ErrorMsg(1);
  1044. return;
  1045. }
  1046. DHT11Temp = temperature * 1.8 + 32;
  1047. DHT11Hum = humidity;
  1048. //Serial.print("Sample OK: ");
  1049. Serial.print((int)temperature); Serial.print(" *C, ");
  1050. Serial.print((int)humidity); Serial.println(" H");
  1051. }
  1052. void CreateDHTMessageT()
  1053. {
  1054. String Msg;
  1055. String stringDHT11T = String(DHT11Temp, DEC);
  1056. Msg = String(" Temp: " + stringDHT11T + "`F ");
  1057. ConvertMsg(Msg);
  1058.  
  1059. }
  1060. void CreateDHTMessageH()
  1061. {
  1062. String Msg;
  1063. String stringDHT11H = String(DHT11Hum, DEC);
  1064. Msg = String(" Humidity: " + stringDHT11H + "% ");
  1065. ConvertMsg(Msg);
  1066.  
  1067. }
  1068. void ErrorMsg(int error)
  1069. {
  1070. String Msg;
  1071. String stringError = String(error, DEC);
  1072. if (error == 1) {
  1073. Msg = String(" DHT 11 Error ");
  1074. }
  1075. ConvertMsg(Msg);
  1076.  
  1077.  
  1078. }
  1079. void PSA(int psanum)
  1080. {
  1081. String Msg;
  1082. if (psanum == 1) {
  1083. Msg = "SkyNet Control V1.08";
  1084. }
  1085. if (psanum == 2) {
  1086. Msg = "Booting... ";
  1087. }
  1088. if (psanum == 3) {
  1089. Msg = "Death To ALL Humans ";
  1090. }
  1091. if (psanum == 4) {
  1092. Msg = " 4:30 Alarm ";
  1093. }
  1094. if (psanum == 5) {
  1095. RunDHT();
  1096. }
  1097. if (psanum == 6) {
  1098. ShowDHT();
  1099. }
  1100. if (psanum == 7) {
  1101. ShowTime();
  1102. }
  1103. if (psanum == 8) {
  1104. ShowDate();
  1105. }
  1106. if (psanum == 1 or 2 or 3 or 4) {
  1107. ConvertMsg(Msg);
  1108. }
  1109. }
  1110. void ConvertMsg(String Msg)
  1111. {
  1112.  
  1113. int MessageLen = Msg.length() + 1;
  1114. char Message[MessageLen];
  1115. Msg.toCharArray(Message, MessageLen);
  1116. DisplayMessage(Message, MessageLen);
  1117. }
  1118. void DisplayMessage(char Message[], int MessageLen)
  1119. {
  1120. int F = 0;
  1121. int mask;
  1122. for (i = 0; i <= MessageLen - 2; i++) // -2 characters from message length for null terminator...
  1123. {
  1124. for (int j = 0; j <= 7; j++) // ByteRowLoop
  1125. {
  1126. Buffer[i][j] = CharData[Message[i]][j];
  1127. BufferM[i][j] = BitMask[Message[i]][j];
  1128. }
  1129. }
  1130. //for (int k = 0; k <= MessageLen - 2; k++) // ByteRowLoop
  1131. //{
  1132. //Rotate1(k);
  1133. //}
  1134.  
  1135. while (i <= 100) // Scanning across the column
  1136. {
  1137. i++;
  1138. for (pxl_clmn = 0; pxl_clmn < 20; pxl_clmn++) // Row selection
  1139. {
  1140. if (pxl_clmn > 18) {
  1141. pos++;
  1142. pxl_clmn = 0;
  1143. }
  1144. if (pos > MessageLen * MessageLen - 2) {
  1145. pxl_clmn = 21;
  1146. }
  1147. for (F = 0; F <= 180; F++) // ByteRowLoop
  1148. {
  1149. digitalWrite (rowArray[ pxl_clmn], HIGH); // Make anode HIGH to turn LED on
  1150. // mask = Bitswap(Buffer[pxl_row][pxl_clmn + pos]);
  1151. // PORTL = 0xFF ^ mask; // Row value directly load to PORTTD(pin 1 to 7)
  1152. PORTL = BitMask[pxl_row][pxl_clmn + pos]; // Row value directly load to PORTTD(pin 1 to 7)
  1153. //delay(1); // Delay between column switching
  1154. digitalWrite (rowArray[pxl_clmn], LOW); // Turn off column
  1155. }
  1156. }
  1157. }
  1158. i = 0;
  1159. F = 0;
  1160. pos = 0;
  1161. for (int R = 0; R >= 128; R++)
  1162. {
  1163. for (int S = 0; R >= 7; R++)
  1164. {
  1165. Buffer[R][S] = 0;
  1166. }
  1167. }
  1168.  
  1169. }
  1170.  
  1171. int Bitswap(int data) {
  1172. int temp;
  1173. bool bin0;
  1174. bool bin1;
  1175. bool bin2;
  1176. bool bin3;
  1177. bool bin4;
  1178. bool bin5;
  1179. bool bin6;
  1180. bool bin7;
  1181. //Serial.print(data, BIN);
  1182. //Serial.print(" -> ");
  1183. bin0 = bitRead(data, 0);
  1184. bin1 = bitRead(data, 1);
  1185. bin2 = bitRead(data, 2);
  1186. bin3 = bitRead(data, 3);
  1187. bin4 = bitRead(data, 4);
  1188. bin5 = bitRead(data, 5);
  1189. bin6 = bitRead(data, 6);
  1190. bin7 = bitRead(data, 7);
  1191. bitWrite(data, 0, bin1);
  1192. bitWrite(data, 1, bin0);
  1193. bitWrite(data, 2, bin3);
  1194. bitWrite(data, 3, bin2);
  1195. bitWrite(data, 4, bin5);
  1196. bitWrite(data, 5, bin4);
  1197. bitWrite(data, 6, bin7);
  1198. bitWrite(data, 7, bin6);
  1199. //Serial.print(data, BIN);
  1200. //Serial.println(data, BIN);
  1201. return data;
  1202. }
  1203.  
  1204. void Rotate1(int ascii) {
  1205. int temp;
  1206. bool bin0;
  1207. bool bin1;
  1208. bool bin2;
  1209. bool bin3;
  1210. bool bin4;
  1211. bool bin5;
  1212. bool bin6;
  1213. bool bin7;
  1214. for (i = 0; i <= 7; i++)
  1215. {
  1216. temp = Buffer[ascii][i];
  1217. bin0 = bitRead(temp, 0);
  1218. bin1 = bitRead(temp, 1);
  1219. bin2 = bitRead(temp, 2);
  1220. bin3 = bitRead(temp, 3);
  1221. bin4 = bitRead(temp, 4);
  1222. bin5 = bitRead(temp, 5);
  1223. bin6 = bitRead(temp, 6);
  1224. bin7 = bitRead(temp, 7);
  1225. bitWrite(BS[7], i, bin0);
  1226. bitWrite(BS[6], i, bin1);
  1227. bitWrite(BS[5], i, bin2);
  1228. bitWrite(BS[4], i, bin3);
  1229. bitWrite(BS[3], i, bin4);
  1230. bitWrite(BS[2], i, bin5);
  1231. bitWrite(BS[1], i, bin6);
  1232. bitWrite(BS[0], i, bin7);
  1233. }
  1234. for (i = 0; i <= 7; i++)
  1235. {
  1236. Buffer[ascii][i] = BS[i];
  1237. }
  1238. return;
  1239. }
  1240. void print2digits(int number) {
  1241. if (number >= 0 && number < 10)
  1242. Serial.write('0');
  1243. Serial.print(number);
  1244. }
  1245. void Cron(int HHnow, int MMnow, int SSnow) {
  1246. String Msg;
  1247. if (HHnow == 17 and MMnow == 0 or HHnow == 17 and MMnow == 01 or HHnow == 4 and MMnow == 02) {
  1248. PSA(4); //Show Alarm Message
  1249. }
  1250. if (MMnow == 0 or MMnow == 5 or MMnow == 10 or MMnow == 15 or MMnow == 20 or MMnow == 25 or MMnow == 30 or MMnow == 35 or MMnow == 40 or MMnow == 45 or MMnow == 50 or MMnow == 55) {
  1251. PSA(5); // RunDHT
  1252. }
  1253. if (MMnow == 1 or MMnow == 6 or MMnow == 11 or MMnow == 16 or MMnow == 21 or MMnow == 26 or MMnow == 31 or MMnow == 36 or MMnow == 41 or MMnow == 46 or MMnow == 51 or MMnow == 56) {
  1254. PSA(6); // ShowDHT
  1255. }
  1256. if ( (MMnow % 2) == 0) {
  1257. PSA(7); // ShowTime }
  1258. }
  1259. if (i % 2) {
  1260. PSA(8); //ShowDate
  1261. }
  1262. }
  1263. // functions to be called when an alarm triggers:
  1264. void MorningAlarm() {
  1265. Serial.println("Alarm: - turn lights off");
  1266. }
  1267.  
  1268. void EveningAlarm() {
  1269. Serial.println("Alarm: - turn lights on");
  1270. }
  1271.  
  1272. void WeeklyAlarm() {
  1273. Serial.println("Alarm: - its Monday Morning");
  1274. }
  1275.  
  1276. //if ( (i % 2) == 0) { do_something(); } even number test
  1277. //if (i % 2) { // do something odd } odd number test
RAW Paste Data