Advertisement
kris83

Bitmaby

Jul 5th, 2021
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.87 KB | None | 0 0
  1. void Skala_BMP() {
  2. #define skala1a_width 13
  3. #define skala1a_height 9
  4. static const unsigned char skala1a_bits[] PROGMEM = {
  5. 0x30, 0x16, 0xf8, 0x08, 0xf8, 0x03, 0xfc, 0x07, 0xfc, 0x03, 0xfe, 0x01,
  6. 0xfe, 0x01, 0xff, 0x00, 0xff, 0x00
  7. };
  8. u8g2.drawXBMP(7, 52, skala1a_width, skala1a_height, skala1a_bits); //1-segment
  9. }
  10.  
  11. void Skala_1_BMP() {
  12. #define skala_1_width 104
  13. #define skala_1_height 41
  14. static const unsigned char skala_1_bits[] PROGMEM = {
  15. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
  16. 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
  17. 0x0b, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x2f,
  18. 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xbf, 0x00,
  19. 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x02, 0xa0,
  20. 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x02,
  21. 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x81,
  22. 0x02, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1c,
  23. 0x80, 0x02, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x80,
  24. 0x05, 0x80, 0x02, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00,
  25. 0x60, 0x09, 0x80, 0x04, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00,
  26. 0x00, 0x18, 0x0a, 0x80, 0x04, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00,
  27. 0x00, 0x00, 0x06, 0x12, 0x80, 0x04, 0xa0, 0x00, 0x28, 0x00, 0x0a, 0x80,
  28. 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x05, 0xa0, 0x00, 0x28, 0x00, 0x0a,
  29. 0x80, 0x00, 0x00, 0xc0, 0x00, 0x24, 0x00, 0x05, 0xa0, 0x00, 0x28, 0x00,
  30. 0x0a, 0x80, 0x00, 0x00, 0x20, 0x00, 0x28, 0x00, 0x05, 0xa0, 0x00, 0x28,
  31. 0x00, 0x0a, 0x80, 0x00, 0x00, 0x48, 0x00, 0x48, 0x00, 0x05, 0xa0, 0x00,
  32. 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x94, 0x00, 0x50, 0x00, 0x05, 0xa0,
  33. 0x00, 0x28, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x23, 0x01, 0x90, 0x00, 0x05,
  34. 0xbf, 0xff, 0xef, 0xff, 0xfb, 0xff, 0x00, 0x80, 0x40, 0x02, 0xa0, 0x00,
  35. 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x04, 0x20,
  36. 0xf9, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x09,
  37. 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
  38. 0x12, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
  39. 0x00, 0x24, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  40. 0x30, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  41. 0x00, 0x44, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  42. 0x00, 0x00, 0x9a, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  43. 0x00, 0x00, 0x00, 0x21, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  44. 0x00, 0x00, 0x00, 0x80, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  45. 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
  46. 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
  47. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00,
  48. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x00, 0x00,
  49. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x00, 0x00,
  50. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x16, 0x00,
  51. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x08,
  52. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
  53. 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  54. 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  55. 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  56. 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  57. 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  58. 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  59. 0x00, 0x00, 0x00, 0x00, 0x00
  60. };
  61. u8g2.drawXBMP(7, 19, skala_1_width, skala_1_height, skala_1_bits); //pusta skala
  62. }
  63.  
  64. void Skala_2_BMP() {
  65. #define skala2a_width 13
  66. #define skala2a_height 11
  67. static const unsigned char skala2a_bits[] PROGMEM = {
  68. 0x20, 0x02, 0xf0, 0x04, 0xf8, 0x19, 0xfc, 0x03, 0xfe, 0x0f, 0xfe, 0x1f,
  69. 0xff, 0x0f, 0xff, 0x07, 0xfc, 0x01, 0xf1, 0x00, 0x47, 0x00
  70. };
  71. u8g2.drawXBMP(12, 43, skala2a_width, skala2a_height, skala2a_bits); //2-segment
  72. }
  73.  
  74. void Skala_3_BMP() {
  75. #define skala3a_width 18
  76. #define skala3a_height 14
  77. static const unsigned char skala3a_bits[] PROGMEM = {
  78. 0x00, 0x09, 0x00, 0x80, 0x13, 0x00, 0xe0, 0x27, 0x00, 0xf0, 0x4f, 0x00,
  79. 0xf8, 0x9f, 0x00, 0xfc, 0x3f, 0x01, 0xfe, 0x7f, 0x02, 0xff, 0xff, 0x00,
  80. 0xfe, 0xff, 0x01, 0xf8, 0xff, 0x03, 0xf3, 0x7f, 0x00, 0xe7, 0x1f, 0x00,
  81. 0x8f, 0x07, 0x00, 0x3f, 0x01, 0x00
  82. };
  83. u8g2.drawXBMP(18, 34, skala3a_width, skala3a_height, skala3a_bits); //3-segment
  84. }
  85.  
  86. void Skala_4_BMP() {
  87. #define skala4a_width 18
  88. #define skala4a_height 16
  89. static const unsigned char skala4a_bits[] PROGMEM = {
  90. 0x00, 0x2c, 0x00, 0x00, 0x4f, 0x00, 0xc0, 0x5f, 0x00, 0xf0, 0x9f, 0x00,
  91. 0xf8, 0xbf, 0x00, 0xfe, 0x3f, 0x01, 0xff, 0x7f, 0x01, 0xfe, 0x7f, 0x02,
  92. 0xfc, 0xff, 0x02, 0xf9, 0xff, 0x00, 0xf3, 0xff, 0x01, 0xe7, 0xff, 0x01,
  93. 0xcf, 0xff, 0x03, 0x9f, 0xff, 0x03, 0x3f, 0x3f, 0x00, 0x7f, 0x06, 0x00
  94. };
  95. u8g2.drawXBMP(28, 27, skala4a_width, skala4a_height, skala4a_bits); //4-segment
  96. }
  97.  
  98. void Skala_5_BMP() {
  99. #define skala5a_width 15
  100. #define skala5a_height 17
  101. static const unsigned char skala5a_bits[] PROGMEM = {
  102. 0x00, 0x38, 0x80, 0x3f, 0xf8, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xfe, 0x3f,
  103. 0xfe, 0x3f, 0xfc, 0x3f, 0xfd, 0x7f, 0xf9, 0x7f, 0xfb, 0x7f, 0xf3, 0x7f,
  104. 0xf7, 0x7f, 0xe7, 0x7f, 0xef, 0x7f, 0xcf, 0x7f, 0xdf, 0x01
  105. };
  106. u8g2.drawXBMP(41, 23, skala5a_width, skala5a_height, skala5a_bits); //5-segment
  107. }
  108.  
  109. void Skala_6_BMP() {
  110. #define skala6a_width 13
  111. #define skala6a_height 16
  112. static const unsigned char skala6a_bits[] PROGMEM = {
  113. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  114. 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f,
  115. 0xfe, 0x1f, 0xfe, 0x1f, 0xfe, 0x1f, 0x7e, 0x00
  116. };
  117. u8g2.drawXBMP(56, 22, skala6a_width, skala6a_height, skala6a_bits); //6-segment
  118. }
  119.  
  120. void Skala_7_BMP() {
  121. #define skala7a_width 13
  122. #define skala7a_height 16
  123. static const unsigned char skala7a_bits[] PROGMEM = {
  124. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  125. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  126. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f
  127. };
  128. u8g2.drawXBMP(70, 21, skala7a_width, skala7a_height, skala7a_bits); //7-segment
  129. }
  130.  
  131. void Skala_8_BMP() {
  132. #define skala8a_width 13
  133. #define skala8a_height 17
  134. static const unsigned char skala8a_bits[] PROGMEM = {
  135. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  136. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  137. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f
  138. };
  139. u8g2.drawXBMP(84, 20, skala8a_width, skala8a_height, skala8a_bits); //8-segment
  140. }
  141.  
  142. void Skala_9_BMP() {
  143. #define skala9a_width 13
  144. #define skala9a_height 18
  145. static const unsigned char skala9a_bits[] PROGMEM = {
  146. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  147. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
  148. 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f
  149. };
  150. u8g2.drawXBMP(98, 19, skala9a_width, skala9a_height, skala9a_bits); //9-segment
  151. }
  152.  
  153. //=================================
  154.  
  155. void Ograniczenie_mocy_BMP(void) {
  156. #define Ograniczenie_mocy_width 23
  157. #define Ograniczenie_mocy_height 14
  158. static const unsigned char Ograniczenie_mocy[] PROGMEM = {
  159. 0xE0, 0x1F, 0x00, 0x80, 0x07, 0x00, 0x80, 0x07,
  160. 0x00, 0xF8, 0x7F, 0x60, 0x0D, 0x80, 0x50, 0x85,
  161. 0x79, 0x49, 0x45, 0x0A, 0x46, 0x07, 0x0A, 0x40,
  162. 0x05, 0x39, 0x40, 0x85, 0x40, 0x40, 0x4D, 0x40,
  163. 0x46, 0xD0, 0x3B, 0x49, 0x20, 0x80, 0x50, 0xC0,
  164. 0x7F, 0x60
  165. };
  166. u8g2.drawXBMP(169, 0, Ograniczenie_mocy_width, Ograniczenie_mocy_height, Ograniczenie_mocy);
  167. }
  168.  
  169. void Akumulator_BMP(void) {
  170. #define Akumulator_width 13
  171. #define Akumulator_height 7
  172. static const unsigned char Akumulator[] PROGMEM = {
  173. 0x1E, 0x0F, 0xE3, 0x18, 0x09, 0x10, 0x1D, 0x17,
  174. 0x09, 0x10, 0x01, 0x10, 0xFF, 0x1F
  175. };
  176. u8g2.drawXBMP(0, 10, Akumulator_width, Akumulator_height, Akumulator);
  177. }
  178.  
  179. void Ladowanie_BMP(void) {
  180. #define Ladowanie_width 8
  181. #define Ladowanie_height 12
  182. static const unsigned char Ladowanie[] PROGMEM = {
  183. 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0xFF, 0x70, 0x38, 0x1D, 0x0F, 0x07, 0x0F, // Code for char num 32
  184. };
  185. u8g2.drawXBMP(0, 19, Ladowanie_width, Ladowanie_height, Ladowanie);
  186. }
  187.  
  188. void Temperatura_BMP(void) {
  189. #define Temperatura_width 10
  190. #define Temperatura_height 15
  191. static const unsigned char Temperatura[] PROGMEM = {
  192. 0x18, 0x00, 0x78, 0x00, 0x78, 0x00, 0x18, 0x00, 0x78, 0x00,
  193. 0x78, 0x00, 0x18, 0x00, 0x78, 0x00, 0x78, 0x00, 0x18, 0x00,
  194. 0x18, 0x00, 0x3B, 0x03, 0xCC, 0x00, 0x33, 0x03, 0xCC, 0x00
  195. };
  196. u8g2.drawXBMP(182, 48, Temperatura_width, Temperatura_height, Temperatura);
  197. }
  198.  
  199. void Swiatla_Pozycyjne_BMP(void) {
  200. #define Swiatla_Pozycyjne_width 10
  201. #define Swiatla_Pozycyjne_height 8
  202. static const unsigned char Swiatla_Pozycyjne[] PROGMEM = {
  203. 0xEC, 0x00, 0x23, 0x01, 0x20, 0x02, 0x2C, 0x02,
  204. 0x23, 0x02, 0x20, 0x02, 0x2C, 0x01, 0xE3, 0x00
  205. };
  206. u8g2.drawXBMP(0, 0, Swiatla_Pozycyjne_width, Swiatla_Pozycyjne_height, Swiatla_Pozycyjne);
  207. }
  208.  
  209. void Swiatla_Dlugie_BMP(void) {
  210. #define Swiatla_Dlugie_width 10
  211. #define Swiatla_Dlugie_height 8
  212. static const unsigned char Swiatla_Dlugie[] PROGMEM = {
  213. 0xE0, 0x00, 0x2F, 0x01, 0x20, 0x02, 0x2F, 0x02,
  214. 0x20, 0x02, 0x2F, 0x02, 0x20, 0x01, 0xE0, 0x00
  215. };
  216. u8g2.drawXBMP(14, 0, Swiatla_Dlugie_width, Swiatla_Dlugie_height, Swiatla_Dlugie);
  217. }
  218.  
  219. void Hamulec_BMP(void) {
  220. #define Hamulec_width 14
  221. #define Hamulec_height 8
  222. static const unsigned char Hamulec[] PROGMEM = {
  223. 0xE4, 0x09, 0x12, 0x12, 0x09, 0x24, 0x09,
  224. 0x24, 0x09, 0x24, 0x09, 0x24, 0x12, 0x12,
  225. 0xE4, 0x09
  226. };
  227. u8g2.drawXBMP(28, 0, Hamulec_width, Hamulec_height, Hamulec);
  228. }
  229.  
  230. void Strzalka_Lewa_BMP(void) {
  231. #define Strzalka_Lewa_width 10
  232. #define Strzalka_Lewa_height 8
  233. static const unsigned char Strzalka_Lewa[] PROGMEM = {
  234. 0x08, 0x00, 0x0C, 0x00, 0x0E, 0x00, 0xFF, 0x03, 0xFF, 0x03,
  235. 0x0E, 0x00, 0x0C, 0x00, 0x08, 0x00, // Code for char num 32
  236. };
  237. u8g2.drawXBMP(46, 0, Strzalka_Lewa_width, Strzalka_Lewa_height, Strzalka_Lewa);
  238. }
  239.  
  240. void Strzalka_Prawa_BMP(void) {
  241. #define Strzalka_Prawa_width 10
  242. #define Strzalka_Prawa_height 8
  243. static const unsigned char Strzalka_Prawa[] PROGMEM = {
  244. 0x40, 0x00, 0xC0, 0x00, 0xC0, 0x01, 0xFF, 0x03, 0xFF, 0x03,
  245. 0xC0, 0x01, 0xC0, 0x00, 0x40, 0x00, // Code for char num 32
  246.  
  247. };
  248. u8g2.drawXBMP(58, 0, Strzalka_Prawa_width, Strzalka_Prawa_height, Strzalka_Prawa);
  249. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement