├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── __pycache__ └── ssd1351.cpython-39.pyc ├── arkanoid.py ├── demo_animated_sprite.py ├── demo_bouncing_boxes.py ├── demo_boundaries.py ├── demo_circuitpython.py ├── demo_color_palette.py ├── demo_color_wheel.py ├── demo_colored_squares.py ├── demo_contrast.py ├── demo_fonts.py ├── demo_fonts_8x8.py ├── demo_fonts_8x8_bgcolor.py ├── demo_fonts_flipped.py ├── demo_fonts_trans.py ├── demo_framebuffer.py ├── demo_images.py ├── demo_mario_ble.py ├── demo_pbm.py ├── demo_scrolling_marquee.py ├── demo_shapes.py ├── demo_sprite.py ├── demo_sprite_framebuffer.py ├── fonts ├── ArcadePix9x11.c ├── Bally5x8.c ├── Bally7x9.c ├── Broadway17x15.c ├── EspressoDolce18x24.c ├── FixedFont5x8.c ├── Neato5x7.c ├── NeatoReduced5x7.c ├── Robotron13x21.c ├── Robotron7x11.c ├── Unispace12x24.c └── Wendy7x8.c ├── images ├── Arkanoid_Border128x118.raw ├── Ball7x7.raw ├── Brick_Blue13x7.raw ├── Brick_Green13x7.raw ├── Brick_Pink13x7.raw ├── Brick_Red13x7.raw ├── Brick_Yellow13x7.raw ├── Mario13x96.raw ├── MicroPython128x128.raw ├── MicroPythonW128x128.raw ├── Ostrich65x512.raw ├── Ostrich65x64.raw ├── Paddle12x4.raw ├── Paddle25x8.raw ├── Pi16x16.raw ├── Python41x49.raw ├── Rainbow_48x26.raw ├── RaspberryPiWB128x128.raw ├── Rototron128x26.raw ├── Tabby128x128.raw ├── Tortie128x128.raw ├── XP_background128x128.raw ├── blinka45x48.raw └── invaders48x36.pbm ├── levels ├── Level001.bin ├── Level002.bin ├── Level003.bin ├── Level004.bin ├── Level005.bin ├── Level006.bin ├── Level007.bin ├── Level008.bin └── Level009.bin ├── ssd1351.py ├── utils ├── generate_levels.py └── img2rgb565.py └── xglcd_font.py /.gitattributes: -------------------------------------------------------------------------------- 1 | *.c linguist-language=python 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .flake8 2 | .ftpconfig 3 | .vscode/ 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # micropython-ssd1351 2 | MicroPython & CircuitPython SSD1351 OLED Display Driver 3 | 4 | Full tutorial on my website [Rototron](https://www.rototron.info/raspberry-pi-esp32-micropython-oled-tutorial/) or click picture below for a YouTube video: 5 | 6 | [![SSD1351 Tutorial](http://img.youtube.com/vi/a7DrFqqu-78/0.jpg)](https://youtu.be/a7DrFqqu-78) 7 | 8 | _Tested on ESP32 (Wemos Lolin32) and Feather nRF52840 Express_ 9 | -------------------------------------------------------------------------------- /__pycache__/ssd1351.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/__pycache__/ssd1351.cpython-39.pyc -------------------------------------------------------------------------------- /arkanoid.py: -------------------------------------------------------------------------------- 1 | """Arkanoid for MicroPython using SSD1351 OLED display.""" 2 | from utime import sleep_us, ticks_ms, ticks_us, ticks_diff 3 | from ssd1351 import Display, color565 4 | from machine import ADC, Pin, SPI 5 | from math import sqrt 6 | from os import stat 7 | from random import randint, seed 8 | from xglcd_font import XglcdFont 9 | 10 | 11 | class Ball(object): 12 | """Ball.""" 13 | 14 | def __init__(self, x, y, x_speed, y_speed, display, width=7, height=7, 15 | frozen=False): 16 | """Initialize ball. 17 | 18 | Args: 19 | x, y (int): X,Y coordinates. 20 | x_speed, y_speed (int): Initial XY speeds. 21 | display (SSD1351): OLED display. 22 | width (Optional int): Ball width (default 7). 23 | height (Optional int): Ball height (default 7). 24 | frozen (boolean): Indicates if ball is frozen (default false). 25 | """ 26 | self.x = x 27 | self.y = y 28 | self.x2 = x + width - 1 29 | self.y2 = y + height - 1 30 | self.prev_x = x 31 | self.prev_y = y 32 | self.width = width 33 | self.height = height 34 | self.center = width // 2 35 | self.max_x_speed = 3 36 | self.max_y_speed = 3 37 | self.frozen = frozen 38 | self.display = display 39 | self.sprite = display.load_sprite('images/Ball7x7.raw', width, height) 40 | self.x_speed = x_speed 41 | self.y_speed = y_speed 42 | self.x_speed2 = 0.0 43 | self.y_speed2 = 0.0 44 | self.created = ticks_ms() 45 | 46 | def clear(self): 47 | """Clear ball.""" 48 | self.display.fill_hrect(self.x, self.y, self.width, self.height, 0) 49 | 50 | def clear_previous(self): 51 | """Clear prevous ball position.""" 52 | self.display.fill_hrect(self.prev_x, self.prev_y, 53 | self.width, self.height, 0) 54 | 55 | def draw(self): 56 | """Draw ball.""" 57 | self.clear_previous() 58 | self.display.draw_sprite(self.sprite, self.x, self.y, 59 | self.width, self.height) 60 | 61 | def set_position(self, paddle_x, paddle_y, paddle_x2, paddle_center): 62 | """Set ball position.""" 63 | self.prev_x = self.x 64 | self.prev_y = self.y 65 | # Check if frozen to paddle 66 | if self.frozen: 67 | # Freeze ball to top center of paddle 68 | self.x = paddle_x + (paddle_center - self.center) 69 | self.y = paddle_y - self.height 70 | if ticks_diff(ticks_ms(), self.created) >= 2000: 71 | # Release frozen ball after 2 seconds 72 | self.frozen = False 73 | else: 74 | return 75 | self.x += int(self.x_speed) + int(self.x_speed2) 76 | self.x_speed2 -= int(self.x_speed2) 77 | self.x_speed2 += self.x_speed - int(self.x_speed) 78 | 79 | self.y += int(self.y_speed) + int(self.y_speed2) 80 | self.y_speed2 -= int(self.y_speed2) 81 | self.y_speed2 += self.y_speed - int(self.y_speed) 82 | 83 | # Bounces off walls 84 | if self.y < 15: 85 | self.y = 15 86 | self.y_speed = -self.y_speed 87 | if self.x + self.width >= 122: 88 | self.x = 123 - self.width 89 | self.x_speed = -self.x_speed 90 | elif self.x < 5: 91 | self.x = 5 92 | self.x_speed = -self.x_speed 93 | 94 | # Check for collision with Paddle 95 | if (self.y2 >= paddle_y and 96 | self.x <= paddle_x2 and 97 | self.x2 >= paddle_x): 98 | # Ball bounces off paddle 99 | self.y = paddle_y - (self.height + 1) 100 | ratio = ((self.x + self.center) - 101 | (paddle_x + paddle_center)) / paddle_center 102 | self.x_speed = ratio * self.max_x_speed 103 | self.y_speed = -sqrt(max(1, self.max_y_speed ** 2 - 104 | self.x_speed ** 2)) 105 | 106 | self.x2 = self.x + self.width - 1 107 | self.y2 = self.y + self.height - 1 108 | 109 | 110 | class Brick(object): 111 | """Brick.""" 112 | 113 | def __init__(self, x, y, color, display, width=13, height=7): 114 | """Initialize brick. 115 | 116 | Args: 117 | x, y (int): X,Y coordinates. 118 | color (string): Blue, Green, Pink, Red or Yellow. 119 | display (SSD1351): OLED display. 120 | width (Optional int): Block width (default 12). 121 | height (Optional int): Block height (default 6). 122 | """ 123 | self.x = x 124 | self.y = y 125 | self.x2 = x + width - 1 126 | self.y2 = y + height - 1 127 | self.center_x = x + (width // 2) 128 | self.center_y = y + (height // 2) 129 | self.color = color 130 | self.width = width 131 | self.height = height 132 | self.display = display 133 | self.draw() 134 | 135 | def bounce(self, ball_x, ball_y, ball_x2, ball_y2, 136 | x_speed, y_speed, 137 | ball_center_x, ball_center_y): 138 | """Determine bounce for ball collision with brick.""" 139 | x = self.x 140 | y = self.y 141 | x2 = self.x2 142 | y2 = self.y2 143 | center_x = self.center_x 144 | center_y = self.center_y 145 | if ((ball_center_x > center_x) and 146 | (ball_center_y > center_y)): 147 | if (ball_center_x - x2) < (ball_center_y - y2): 148 | y_speed = -y_speed 149 | elif (ball_center_x - x2) > (ball_center_y - y2): 150 | x_speed = -x_speed 151 | else: 152 | x_speed = -x_speed 153 | y_speed = -y_speed 154 | elif ((ball_center_x > center_x) and 155 | (ball_center_y < center_y)): 156 | if (ball_center_x - x2) < -(ball_center_y - y): 157 | y_speed = -y_speed 158 | elif (ball_center_x - x2) > -(ball_center_y - y): 159 | x_speed = -x_speed 160 | else: 161 | x_speed = -x_speed 162 | y_speed = -y_speed 163 | elif ((ball_center_x < center_x) and 164 | (ball_center_y < center_y)): 165 | if -(ball_center_x - x) < -(ball_center_y - y): 166 | y_speed = -y_speed 167 | elif -(ball_center_x - x) > -(ball_center_y - y): 168 | y_speed = -y_speed 169 | else: 170 | x_speed = -x_speed 171 | y_speed = -y_speed 172 | elif ((ball_center_x < center_x) and 173 | (ball_center_y > center_y)): 174 | if -(ball_center_x - x) < (ball_center_y - y2): 175 | y_speed = -y_speed 176 | elif -(ball_center_x - x) > (ball_center_y - y2): 177 | x_speed = -x_speed 178 | else: 179 | x_speed = -x_speed 180 | y_speed = -y_speed 181 | 182 | return [x_speed, y_speed] 183 | 184 | def clear(self): 185 | """Clear brick.""" 186 | self.display.fill_hrect(self.x, self.y, self.width, self.height, 0) 187 | 188 | def draw(self): 189 | """Draw brick.""" 190 | self.display.draw_image('images/Brick_' + self.color + '13x7.raw', 191 | self.x, self.y, self.width, self.height) 192 | 193 | 194 | class Life(object): 195 | """Life.""" 196 | 197 | def __init__(self, index, display, width=12, height=4): 198 | """Initialize life. 199 | 200 | Args: 201 | index (int): Life number (1-based). 202 | display (SSD1351): OLED display. 203 | width (Optional int): Life width (default 12). 204 | height (Optional int): Life height (default 4). 205 | """ 206 | margin = 5 207 | self.display = display 208 | self.x = display.width - (index * (width + margin)) 209 | self.y = 3 210 | self.width = width 211 | self.height = height 212 | self.sprite = display.load_sprite('images/Paddle12x4.raw', 213 | width, height) 214 | self.draw() 215 | 216 | def clear(self): 217 | """Clear life.""" 218 | self.display.fill_hrect(self.x, self.y, self.width, self.height, 0) 219 | 220 | def draw(self): 221 | """Draw life.""" 222 | self.display.draw_sprite(self.sprite, self.x, self.y, 223 | self.width, self.height) 224 | 225 | 226 | class Paddle(object): 227 | """Paddle.""" 228 | 229 | def __init__(self, display, width=25, height=8): 230 | """Initialize paddle. 231 | 232 | Args: 233 | display (SSD1351): OLED display. 234 | width (Optional int): Paddle width (default 25). 235 | height (Optional int): Paddle height (default 8). 236 | """ 237 | self.x = 51 238 | self.y = 120 239 | self.x2 = self.x + width - 1 240 | self.y2 = self.y + height - 1 241 | self.width = width 242 | self.height = height 243 | self.center = width // 2 244 | self.display = display 245 | self.sprite = display.load_sprite('images/Paddle25x8.raw', 246 | width, height) 247 | 248 | def clear(self): 249 | """Clear paddle.""" 250 | self.display.fill_hrect(self.x, self.y, self.width, self.height, 0) 251 | 252 | def draw(self): 253 | """Draw paddle.""" 254 | self.display.draw_sprite(self.sprite, self.x, self.y, 255 | self.width, self.height) 256 | 257 | def h_position(self, x): 258 | """Set paddle position. 259 | 260 | Args: 261 | x (int): X coordinate. 262 | """ 263 | if(x != self.x): # Check if paddle moved 264 | prev_x = self.x # Store previous x position 265 | self.x = x 266 | self.x2 = x + self.width - 1 267 | self.y2 = self.y + self.height - 1 268 | self.draw() 269 | # Clear previous paddle 270 | if x > prev_x: 271 | self.display.fill_hrect(prev_x, self.y, 272 | x - prev_x, self.height, 0) 273 | else: 274 | self.display.fill_hrect(x + self.width, self.y, 275 | (prev_x + self.width) - 276 | (x + self.width), 277 | self.height, 0) 278 | else: 279 | self.draw() 280 | 281 | 282 | class Powerup(object): 283 | """Power-up.""" 284 | 285 | def __init__(self, x, y, display, width=16, height=16): 286 | """Initialize power-up. 287 | 288 | Args: 289 | x, y (int): X,Y coordinates. 290 | display (SSD1351): OLED display. 291 | width (Optional int): Power-up width (default 16). 292 | height (Optional int): Power-up height (default 16). 293 | """ 294 | if x > display.width - (5 + width): 295 | x = display.width - (5 + width) 296 | self.x = x 297 | self.y = y 298 | self.x2 = x + width - 1 299 | self.y2 = y + height - 1 300 | self.prev_y = y 301 | self.width = width 302 | self.height = height 303 | self.display = display 304 | self.sprite = display.load_sprite('images/Pi16x16.raw', width, height) 305 | self.y_speed = 2 306 | self.collected = False 307 | 308 | def clear(self): 309 | """Clear power-up.""" 310 | self.display.fill_hrect(self.x, self.y, self.width, self.height, 0) 311 | 312 | def clear_previous(self): 313 | """Clear prevous power-up position.""" 314 | self.display.fill_hrect(self.x, self.prev_y, 315 | self.width, self.height, 0) 316 | 317 | def draw(self): 318 | """Draw power-up.""" 319 | self.clear_previous() 320 | self.display.draw_sprite(self.sprite, self.x, self.y, 321 | self.width, self.height) 322 | 323 | def set_position(self, paddle_x, paddle_y, paddle_x2, paddle_center): 324 | """Set power-up position.""" 325 | self.prev_y = self.y 326 | self.y += self.y_speed 327 | 328 | # Check for collision with Paddle 329 | if (self.y2 >= paddle_y and 330 | self.x <= paddle_x2 and 331 | self.x2 >= paddle_x): 332 | self.collected = True 333 | 334 | self.y2 = self.y + self.height - 1 335 | 336 | 337 | class Score(object): 338 | """Score.""" 339 | 340 | def __init__(self, display): 341 | """Initialize score. 342 | 343 | Args: 344 | display (SSD1351): OLED display. 345 | """ 346 | margin = 5 347 | self.display = display 348 | self.xfont = XglcdFont('fonts/NeatoReduced5x7.c', 5, 7) 349 | self.display.draw_text(margin, 0, 'SCORE:', self.xfont, 350 | color565(255, 0, 0)) 351 | text_length = self.xfont.measure_text('SCORE: ') 352 | self.x = text_length + margin 353 | self.y = 0 354 | self.value = 0 355 | self.draw() 356 | 357 | def draw(self): 358 | """Draw score value.""" 359 | self.display.draw_text(self.x, self.y, str(self.value), self.xfont, 360 | color565(255, 255, 255)) 361 | 362 | def game_over(self): 363 | """Display game over.""" 364 | game_over_width = self.xfont.measure_text('GAME OVER') 365 | self.display.draw_text((self.display.width // 2) - 366 | (game_over_width // 2), 367 | int(self.display.height / 1.5), 368 | 'GAME OVER', self.xfont, 369 | color565(255, 255, 255)) 370 | 371 | def increment(self, points): 372 | """Increase score by specified points.""" 373 | self.value += points 374 | self.draw() 375 | 376 | def reset(self): 377 | """Reset score.""" 378 | self.value = 0 379 | self.display.fill_hrect(self.x, self.y, self.display.width - self.x, 380 | 7, 0) 381 | 382 | 383 | def load_level(level, display): 384 | """Load level brick coordinates and colors from bin file. 385 | 386 | Notes: 387 | Level file consists of 5 values for each brick: 388 | x, y, x2, y2, color(index) 389 | """ 390 | bricks = [] 391 | brick_colors = ['Red', 'Yellow', 'Blue', 'Pink', 'Green'] 392 | path = 'levels/Level{0:03d}.bin'.format(level) 393 | level_size = stat(path)[6] 394 | level = bytearray(level_size) 395 | with open(path, 'rb') as f: 396 | f.readinto(level) 397 | 398 | for i in range(0, level_size, 3): 399 | bricks.append(Brick(level[i], 400 | level[i + 1], 401 | brick_colors[level[i + 2]], 402 | display)) 403 | return bricks 404 | 405 | 406 | def main(): 407 | """Initialize display.""" 408 | # Baud rate of 14500000 seems about the max 409 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 410 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 411 | 412 | # Draw background image 413 | display.draw_image('images/Arkanoid_Border128x118.raw', 0, 10, 128, 118) 414 | 415 | # Initialize ADC on VP pin 36 416 | adc = ADC(Pin(36)) 417 | # Set attenuation 0-2V (Will use resistor to limit pot to 2V). 418 | adc.atten(ADC.ATTN_6DB) 419 | 420 | # Seed random numbers 421 | seed(ticks_us()) 422 | 423 | # Generate bricks 424 | MAX_LEVEL = const(9) 425 | level = 1 426 | bricks = load_level(level, display) 427 | 428 | # Initialize paddle 429 | paddle = Paddle(display) 430 | 431 | # Initialize score 432 | score = Score(display) 433 | 434 | # Initialize balls 435 | balls = [] 436 | # Add first ball 437 | balls.append(Ball(59, 111, -2, -1, display, frozen=True)) 438 | 439 | # Initialize lives 440 | lives = [] 441 | for i in range(1, 3): 442 | lives.append(Life(i, display)) 443 | 444 | # Initialize power-ups 445 | powerups = [] 446 | 447 | try: 448 | while True: 449 | timer = ticks_us() 450 | # Set paddle position to ADC spinner (scale 6 - 98) 451 | paddle.h_position(adc.read() // 44 + 5) 452 | # Handle balls 453 | score_points = 0 454 | for ball in balls: 455 | # Position 456 | ball.set_position(paddle.x, paddle.y, 457 | paddle.x2, paddle.center) 458 | 459 | # Check for collision with bricks if not frozen 460 | if not ball.frozen: 461 | prior_collision = False 462 | ball_x = ball.x 463 | ball_y = ball.y 464 | ball_x2 = ball.x2 465 | ball_y2 = ball.y2 466 | ball_center_x = ball.x + ((ball.x2 + 1 - ball.x) // 2) 467 | ball_center_y = ball.y + ((ball.y2 + 1 - ball.y) // 2) 468 | # Check for hits 469 | for brick in bricks: 470 | if(ball_x2 >= brick.x and 471 | ball_x <= brick.x2 and 472 | ball_y2 >= brick.y and 473 | ball_y <= brick.y2): 474 | # Hit 475 | if not prior_collision: 476 | ball.x_speed, ball.y_speed = brick.bounce( 477 | ball.x, 478 | ball.y, 479 | ball.x2, 480 | ball.y2, 481 | ball.x_speed, 482 | ball.y_speed, 483 | ball_center_x, 484 | ball_center_y) 485 | prior_collision = True 486 | score_points += 1 487 | brick.clear() 488 | bricks.remove(brick) 489 | 490 | # Generate random power-ups 491 | if score_points > 0 and randint(1, 20) == 7: 492 | powerups.append(Powerup(ball.x, 64, display)) 493 | 494 | # Check for missed 495 | if ball.y2 > display.height - 3: 496 | ball.clear_previous() 497 | balls.remove(ball) 498 | if not balls: 499 | # Clear powerups 500 | powerups.clear() 501 | # Lose life if last ball on screen 502 | if len(lives) == 0: 503 | score.game_over() 504 | else: 505 | # Subtract Life 506 | lives.pop().clear() 507 | # Add ball 508 | balls.append(Ball(59, 112, 2, -3, display, 509 | frozen=True)) 510 | else: 511 | # Draw ball 512 | ball.draw() 513 | # Update score if changed 514 | if score_points: 515 | score.increment(score_points) 516 | # Handle power-ups 517 | for powerup in powerups: 518 | powerup.set_position(paddle.x, paddle.y, 519 | paddle.x2, paddle.center) 520 | powerup.draw() 521 | if powerup.collected: 522 | # Power-up collected 523 | powerup.clear() 524 | # Add ball 525 | balls.append(Ball(powerup.x, 112, 2, -1, display, 526 | frozen=False)) 527 | powerups.remove(powerup) 528 | elif powerup.y2 > display.height - 3: 529 | # Power-up missed 530 | powerup.clear() 531 | powerups.remove(powerup) 532 | 533 | # Check for level completion 534 | if not bricks: 535 | for ball in balls: 536 | ball.clear() 537 | balls.clear() 538 | for powerup in powerups: 539 | powerup.clear() 540 | powerups.clear() 541 | level += 1 542 | if level > MAX_LEVEL: 543 | level = 1 544 | bricks = load_level(level, display) 545 | balls.append(Ball(59, 111, -2, -1, display, frozen=True)) 546 | # Attempt to set framerate to 30 FPS 547 | timer_dif = 33333 - ticks_diff(ticks_us(), timer) 548 | if timer_dif > 0: 549 | sleep_us(timer_dif) 550 | except KeyboardInterrupt: 551 | display.cleanup() 552 | 553 | 554 | main() 555 | -------------------------------------------------------------------------------- /demo_animated_sprite.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (animated sprite). 2 | 3 | Notes: May require device with PSRAM 4 | """ 5 | from ssd1351 import Display 6 | from machine import Pin, SPI # type: ignore 7 | from micropython import const # type: ignore 8 | from utime import sleep_us, ticks_us, ticks_diff # type: ignore 9 | 10 | SPRITE_WIDTH = const(65) 11 | SPRITE_HEIGHT = const(64) 12 | SPRITE_COUNT = const(8) 13 | SIZE = const(8320) # width (65) x height (64) x bytes of color (2) 14 | 15 | 16 | def test(): 17 | """Test code.""" 18 | try: 19 | # Baud rate of 40000000 seems about the max 20 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 21 | # display = Display(spi, dc=Pin(4), cs=Pin(16), rst=Pin(17)) 22 | display = Display(spi, dc=Pin(4), cs=Pin(5), rst=Pin(15)) 23 | display.clear() 24 | 25 | # Load sprite 26 | ostrich = display.load_sprite('images/Ostrich65x512.raw', 27 | SPRITE_WIDTH, 28 | SPRITE_HEIGHT * SPRITE_COUNT) 29 | # Use memoryview to improve memory usage 30 | mv_ostrich = memoryview(ostrich) 31 | 32 | x = (display.width - SPRITE_WIDTH) // 2 33 | y = (display.height - SPRITE_HEIGHT) // 2 34 | index = 0 # Sprite frame index 35 | 36 | while True: 37 | timer = ticks_us() 38 | offset = SIZE * index 39 | display.draw_sprite(mv_ostrich[offset: offset + SIZE], x, y, 40 | SPRITE_WIDTH, SPRITE_HEIGHT) 41 | index = (index + 1) & 7 # Next sprite index (wrap on last) 42 | 43 | # Attempt to set framerate to 30 FPS 44 | timer_dif = 33333 - ticks_diff(ticks_us(), timer) 45 | if timer_dif > 0: 46 | sleep_us(timer_dif) 47 | 48 | except KeyboardInterrupt: 49 | display.cleanup() 50 | 51 | 52 | test() 53 | -------------------------------------------------------------------------------- /demo_bouncing_boxes.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (bouncing boxes).""" 2 | from machine import Pin, SPI 3 | from random import random, seed 4 | from ssd1351 import Display, color565 5 | from utime import sleep_us, ticks_cpu, ticks_us, ticks_diff 6 | 7 | 8 | class Box(object): 9 | """Bouncing box.""" 10 | 11 | def __init__(self, screen_width, screen_height, size, display, color): 12 | """Initialize box. 13 | 14 | Args: 15 | screen_width (int): Width of screen. 16 | screen_height (int): Width of height. 17 | size (int): Square side length. 18 | display (SSD1351): OLED display object. 19 | color (int): RGB565 color value. 20 | """ 21 | self.size = size 22 | self.w = screen_width 23 | self.h = screen_height 24 | self.display = display 25 | self.color = color 26 | # Generate non-zero random speeds between -5.0 and 5.0 27 | seed(ticks_cpu()) 28 | r = random() * 10.0 29 | self.x_speed = 5.0 - r if r < 5.0 else r - 10.0 30 | r = random() * 10.0 31 | self.y_speed = 5.0 - r if r < 5.0 else r - 10.0 32 | 33 | self.x = self.w / 2.0 34 | self.y = self.h / 2.0 35 | self.prev_x = self.x 36 | self.prev_y = self.y 37 | 38 | def update_pos(self): 39 | """Update box position and speed.""" 40 | x = self.x 41 | y = self.y 42 | size = self.size 43 | w = self.w 44 | h = self.h 45 | x_speed = abs(self.x_speed) 46 | y_speed = abs(self.y_speed) 47 | self.prev_x = x 48 | self.prev_y = y 49 | 50 | if x + size >= w - x_speed: 51 | self.x_speed = -x_speed 52 | elif x - size <= x_speed + 1: 53 | self.x_speed = x_speed 54 | 55 | if y + size >= h - y_speed: 56 | self.y_speed = -y_speed 57 | elif y - size <= y_speed + 1: 58 | self.y_speed = y_speed 59 | 60 | self.x = x + self.x_speed 61 | self.y = y + self.y_speed 62 | 63 | def draw(self): 64 | """Draw box.""" 65 | x = int(self.x) 66 | y = int(self.y) 67 | size = self.size 68 | prev_x = int(self.prev_x) 69 | prev_y = int(self.prev_y) 70 | self.display.fill_hrect(prev_x - size, 71 | prev_y - size, 72 | size, size, 0) 73 | self.display.fill_hrect(x - size, 74 | y - size, 75 | size, size, self.color) 76 | 77 | 78 | def test(): 79 | """Bouncing box.""" 80 | try: 81 | # Baud rate of 14500000 seems about the max 82 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 83 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 84 | display.clear() 85 | 86 | colors = [color565(255, 0, 0), 87 | color565(0, 255, 0), 88 | color565(0, 0, 255), 89 | color565(255, 255, 0), 90 | color565(0, 255, 255), 91 | color565(255, 0, 255)] 92 | sizes = [12, 11, 10, 9, 8, 7] 93 | boxes = [Box(128, 128, sizes[i], display, 94 | colors[i]) for i in range(6)] 95 | 96 | while True: 97 | timer = ticks_us() 98 | for b in boxes: 99 | b.update_pos() 100 | b.draw() 101 | # Attempt to set framerate to 30 FPS 102 | timer_dif = 33333 - ticks_diff(ticks_us(), timer) 103 | if timer_dif > 0: 104 | sleep_us(timer_dif) 105 | 106 | except KeyboardInterrupt: 107 | display.cleanup() 108 | 109 | 110 | test() 111 | -------------------------------------------------------------------------------- /demo_boundaries.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (boundaries).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | 6 | RED = const(0XF800) # (255, 0, 0) 7 | GREEN = const(0X07E0) # (0, 255, 0) 8 | WHITE = const(0XFFF) # (255, 255, 255) 9 | 10 | 11 | def test(): 12 | """Test code.""" 13 | # Baud rate of 14500000 seems about the max 14 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 15 | print('spi started') 16 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 17 | print('display started') 18 | 19 | w = display.width 20 | h = display.height 21 | 22 | display.clear() 23 | 24 | display.draw_rectangle(0, 0, w, h, RED) 25 | display.draw_pixel(0, 0, WHITE) 26 | display.draw_pixel(0, h - 1, WHITE) 27 | display.draw_pixel(w - 1, 0, WHITE) 28 | display.draw_pixel(w - 1, h - 1, WHITE) 29 | sleep(5) 30 | 31 | display.fill_rectangle(0, 0, w, h, GREEN) 32 | sleep(5) 33 | 34 | display.draw_rectangle(0, 0, w, h, RED) 35 | display.draw_pixel(0, 0, WHITE) 36 | display.draw_pixel(0, h - 1, WHITE) 37 | display.draw_pixel(w - 1, 0, WHITE) 38 | display.draw_pixel(w - 1, h - 1, WHITE) 39 | 40 | sleep(10) 41 | display.cleanup() 42 | 43 | 44 | test() 45 | -------------------------------------------------------------------------------- /demo_circuitpython.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (CircuitPython Text, Shape & Sprite).""" 2 | import board 3 | from busio import SPI 4 | from digitalio import DigitalInOut 5 | from ssd1351 import Display, color565 6 | from xglcd_font import XglcdFont 7 | from time import monotonic, sleep 8 | from sys import exit, implementation 9 | 10 | 11 | class BouncingSprite(object): 12 | """Bouncing Sprite.""" 13 | 14 | def __init__(self, path, w, h, screen_width, screen_height, 15 | speed, display): 16 | """Initialize sprite. 17 | Args: 18 | path (string): Path of sprite image. 19 | w, h (int): Width and height of image. 20 | screen_width (int): Width of screen. 21 | screen_height (int): Width of height. 22 | size (int): Square side length. 23 | speed(int): Initial XY-Speed of sprite. 24 | display (SSD1351): OLED display object. 25 | color (int): RGB565 color value. 26 | """ 27 | self.buf = display.load_sprite(path, w, h) 28 | self.w = w 29 | self.h = h 30 | self.screen_width = screen_width 31 | self.screen_height = screen_height 32 | self.display = display 33 | self.x_speed = speed 34 | self.y_speed = speed 35 | self.x = self.screen_width // 2 36 | self.y = self.screen_height // 2 37 | self.prev_x = self.x 38 | self.prev_y = self.y 39 | 40 | def update_pos(self): 41 | """Update sprite speed and position.""" 42 | x = self.x 43 | y = self.y 44 | w = self.w 45 | h = self.h 46 | x_speed = abs(self.x_speed) 47 | y_speed = abs(self.y_speed) 48 | 49 | if x + w + x_speed >= self.screen_width: 50 | self.x_speed = -x_speed 51 | elif x - x_speed < 0: 52 | self.x_speed = x_speed 53 | 54 | if y + h + y_speed >= self.screen_height: 55 | self.y_speed = -y_speed 56 | elif y - y_speed <= 20: 57 | self.y_speed = y_speed 58 | 59 | self.prev_x = x 60 | self.prev_y = y 61 | 62 | self.x = x + self.x_speed 63 | self.y = y + self.y_speed 64 | 65 | def draw(self): 66 | """Draw sprite.""" 67 | x = self.x 68 | y = self.y 69 | prev_x = self.prev_x 70 | prev_y = self.prev_y 71 | w = self.w 72 | h = self.h 73 | x_speed = abs(self.x_speed) 74 | y_speed = abs(self.y_speed) 75 | 76 | # Determine direction and remove previous portion of sprite 77 | if prev_x > x: 78 | # Left 79 | self.display.fill_vrect(x + w, prev_y, x_speed, h, 0) 80 | elif prev_x < x: 81 | # Right 82 | self.display.fill_vrect(x - x_speed, prev_y, x_speed, h, 0) 83 | if prev_y > y: 84 | # Upward 85 | self.display.fill_vrect(prev_x, y + h, w, y_speed, 0) 86 | elif prev_y < y: 87 | # Downward 88 | self.display.fill_vrect(prev_x, y - y_speed, w, y_speed, 0) 89 | 90 | self.display.draw_sprite(self.buf, x, y, w, h) 91 | 92 | 93 | def test(): 94 | """CircuitPython Text, Shape & Sprite""" 95 | if implementation.name != 'circuitpython': 96 | print() 97 | print('This demo is for CircuitPython only!') 98 | exit() 99 | try: 100 | # Configuratoin for CS and DC pins: 101 | cs_pin = DigitalInOut(board.P0_15) 102 | dc_pin = DigitalInOut(board.P0_17) 103 | rst_pin = DigitalInOut(board.P0_20) 104 | 105 | # Setup SPI bus using hardware SPI: 106 | spi = SPI(clock=board.P0_24, MOSI=board.P0_22) 107 | 108 | # Create the SSD1351 display: 109 | display = Display(spi, dc=dc_pin, cs=cs_pin, rst=rst_pin) 110 | display.clear() 111 | 112 | # Load Fixed Font 113 | fixed = XglcdFont('fonts/FixedFont5x8.c', 5, 8, letter_count=96) 114 | 115 | # Title 116 | WIDTH = 128 117 | text = 'CircuitPython Demo' 118 | # Measure text and center 119 | length = fixed.measure_text(text) 120 | x = int((WIDTH / 2) - (length / 2)) 121 | display.draw_text(x, 6, text, fixed, color565(255, 255, 0)) 122 | 123 | # Draw title outline 124 | display.draw_rectangle(0, 0, 127, 20, color565(0, 255, 0)) 125 | 126 | # Load sprite 127 | logo = BouncingSprite('images/blinka45x48.raw', 128 | 45, 48, 128, 128, 1, display) 129 | 130 | while True: 131 | timer = monotonic() 132 | logo.update_pos() 133 | logo.draw() 134 | # Attempt to set framerate to 30 FPS 135 | timer_dif = .033333333 - (monotonic() - timer) 136 | if timer_dif > 0: 137 | sleep(timer_dif) 138 | 139 | except KeyboardInterrupt: 140 | display.cleanup() 141 | 142 | 143 | test() 144 | -------------------------------------------------------------------------------- /demo_color_palette.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (color palette).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | 6 | 7 | def hsv_to_rgb(h, s, v): 8 | """ 9 | Convert HSV to RGB (based on colorsys.py). 10 | 11 | Args: 12 | h (float): Hue 0 to 1. 13 | s (float): Saturation 0 to 1. 14 | v (float): Value 0 to 1 (Brightness). 15 | """ 16 | if s == 0.0: 17 | return v, v, v 18 | i = int(h * 6.0) 19 | f = (h * 6.0) - i 20 | p = v * (1.0 - s) 21 | q = v * (1.0 - s * f) 22 | t = v * (1.0 - s * (1.0 - f)) 23 | i = i % 6 24 | 25 | v = int(v * 255) 26 | t = int(t * 255) 27 | p = int(p * 255) 28 | q = int(q * 255) 29 | 30 | if i == 0: 31 | return v, t, p 32 | if i == 1: 33 | return q, v, p 34 | if i == 2: 35 | return p, v, t 36 | if i == 3: 37 | return p, q, v 38 | if i == 4: 39 | return t, p, v 40 | if i == 5: 41 | return v, p, q 42 | 43 | 44 | def test(): 45 | """Test code.""" 46 | # Baud rate of 14500000 seems about the max 47 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 48 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 49 | 50 | c = 0 51 | for x in range(0, 128, 16): 52 | for y in range(0, 128, 16): 53 | color = color565(*hsv_to_rgb(c / 64, 1, 1)) 54 | display.fill_circle(x + 7, y + 7, 7, color) 55 | c += 1 56 | sleep(9) 57 | display.cleanup() 58 | 59 | 60 | test() 61 | -------------------------------------------------------------------------------- /demo_color_wheel.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (color wheel).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | from math import cos, pi, sin 6 | 7 | HALF_WIDTH = const(64) 8 | HALF_HEIGHT = const(64) 9 | CENTER_X = const(63) 10 | CENTER_Y = const(63) 11 | ANGLE_STEP_SIZE = 0.05 # Decrease step size for higher resolution 12 | PI2 = pi * 2 13 | 14 | 15 | def hsv_to_rgb(h, s, v): 16 | """ 17 | Convert HSV to RGB (based on colorsys.py). 18 | 19 | Args: 20 | h (float): Hue 0 to 1. 21 | s (float): Saturation 0 to 1. 22 | v (float): Value 0 to 1 (Brightness). 23 | """ 24 | if s == 0.0: 25 | return v, v, v 26 | i = int(h * 6.0) 27 | f = (h * 6.0) - i 28 | p = v * (1.0 - s) 29 | q = v * (1.0 - s * f) 30 | t = v * (1.0 - s * (1.0 - f)) 31 | i = i % 6 32 | 33 | v = int(v * 255) 34 | t = int(t * 255) 35 | p = int(p * 255) 36 | q = int(q * 255) 37 | 38 | if i == 0: 39 | return v, t, p 40 | if i == 1: 41 | return q, v, p 42 | if i == 2: 43 | return p, v, t 44 | if i == 3: 45 | return p, q, v 46 | if i == 4: 47 | return t, p, v 48 | if i == 5: 49 | return v, p, q 50 | 51 | 52 | def test(): 53 | """Test code.""" 54 | # Baud rate of 14500000 seems about the max 55 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 56 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 57 | 58 | x, y = 0, 0 59 | angle = 0.0 60 | # Loop all angles from 0 to 2 * PI radians 61 | while angle < PI2: 62 | # Calculate x, y from a vector with known length and angle 63 | x = int(CENTER_X * sin(angle) + HALF_WIDTH) 64 | y = int(CENTER_Y * cos(angle) + HALF_HEIGHT) 65 | color = color565(*hsv_to_rgb(angle / PI2, 1, 1)) 66 | display.draw_line(x, y, CENTER_X, CENTER_Y, color) 67 | angle += ANGLE_STEP_SIZE 68 | 69 | sleep(5) 70 | 71 | for r in range(CENTER_X, 0, -1): 72 | color = color565(*hsv_to_rgb(r / HALF_WIDTH, 1, 1)) 73 | display.fill_circle(CENTER_X, CENTER_Y, r, color) 74 | 75 | sleep(9) 76 | display.cleanup() 77 | 78 | 79 | test() 80 | -------------------------------------------------------------------------------- /demo_colored_squares.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (colored squares).""" 2 | from time import sleep 3 | from ssd1351 import Display 4 | from machine import Pin, SPI 5 | from sys import modules 6 | 7 | RED = const(0XF800) # (255, 0, 0) 8 | GREEN = const(0X07E0) # (0, 255, 0) 9 | BLUE = const(0X001F) # (0, 0, 255) 10 | YELLOW = const(0XFFE0) # (255, 255, 0) 11 | FUCHSIA = const(0XF81F) # (255, 0, 255) 12 | AQUA = const(0X07FF) # (0, 255, 255) 13 | MAROON = const(0X8000) # (128, 0, 0) 14 | DARKGREEN = const(0X0400) # (0, 128, 0) 15 | NAVY = const(0X0010) # (0, 0, 128) 16 | TEAL = const(0X0410) # (0, 128, 128) 17 | PURPLE = const(0X8010) # (128, 0, 128) 18 | OLIVE = const(0X8400) # (128, 128, 0) 19 | ORANGE = const(0XFC00) # (255, 128, 0) 20 | DEEP_PINK = const(0XF810) # (255, 0, 128) 21 | CHARTREUSE = const(0X87E0) # (128, 255, 0) 22 | SPRING_GREEN = const(0X07F0) # (0, 255, 128) 23 | INDIGO = const(0X801F) # (128, 0, 255) 24 | DODGER_BLUE = const(0X041F) # (0, 128, 255) 25 | CYAN = const(0X87FF) # (128, 255, 255) 26 | PINK = const(0XFC1F) # (255, 128, 255) 27 | LIGHT_YELLOW = const(0XFFF0) # (255, 255, 128) 28 | LIGHT_CORAL = const(0XFC10) # (255, 128, 128) 29 | LIGHT_GREEN = const(0X87F0) # (128, 255, 128) 30 | LIGHT_SLATE_BLUE = const(0X841F) # (128, 128, 255) 31 | WHITE = const(0XFFFF) # (255, 255, 255) 32 | 33 | 34 | def test(): 35 | """Test code.""" 36 | # Baud rate of 14500000 seems about the max 37 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 38 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 39 | 40 | # Build color list from all upper case constants (lazy approach) 41 | colors = [getattr(modules[__name__], name) for name in dir( 42 | modules[__name__]) if name.isupper() and name is not 'SPI'] 43 | 44 | c = 0 45 | for y in range(1, 126, 25): 46 | for x in range(1, 126, 25): 47 | display.fill_rectangle(x, y, 25, 25, colors[c]) 48 | c += 1 49 | sleep(9) 50 | display.cleanup() 51 | 52 | 53 | test() 54 | -------------------------------------------------------------------------------- /demo_contrast.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (contrast).""" 2 | from time import sleep 3 | from ssd1351 import color565, Display 4 | from machine import Pin, SPI 5 | from xglcd_font import XglcdFont 6 | 7 | 8 | def test(): 9 | """Test code.""" 10 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 11 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 12 | display.contrast(0) 13 | display.draw_image('images/MicroPython128x128.raw', 14 | 0, 0, 128, 128) 15 | 16 | fixed_font = XglcdFont('fonts/FixedFont5x8.c', 5, 8) 17 | contrast_range = list(range(1, 16)) + list(reversed(range(15))) 18 | for c in contrast_range: 19 | display.contrast(c) 20 | display.draw_text(30, 120, 'contrast: {0:02d}'.format(c), 21 | fixed_font, color565(255, 255, 255)) 22 | sleep(1) 23 | 24 | display.cleanup() 25 | 26 | 27 | test() 28 | -------------------------------------------------------------------------------- /demo_fonts.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (fonts).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | from xglcd_font import XglcdFont 6 | 7 | 8 | def test(): 9 | """Test code.""" 10 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 11 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 12 | 13 | print("Loading fonts, please wait.") 14 | arcadepix = XglcdFont('fonts/ArcadePix9x11.c', 9, 11) 15 | bally = XglcdFont('fonts/Bally7x9.c', 7, 9) 16 | broadway = XglcdFont('fonts/Broadway17x15.c', 17, 15) 17 | espresso_dolce = XglcdFont('fonts/EspressoDolce18x24.c', 18, 24) 18 | fixed_font = XglcdFont('fonts/FixedFont5x8.c', 5, 8) 19 | neato = XglcdFont('fonts/Neato5x7.c', 5, 7, letter_count=223) 20 | robotron = XglcdFont('fonts/Robotron7x11.c', 7, 11) 21 | unispace = XglcdFont('fonts/Unispace12x24.c', 12, 24) 22 | wendy = XglcdFont('fonts/Wendy7x8.c', 7, 8) 23 | print("Fonts loaded.") 24 | 25 | display.draw_text(0, 0, 'Arcade Pix 9x11', arcadepix, color565(255, 0, 0)) 26 | display.draw_text(0, 12, 'Bally 7x9', bally, color565(0, 255, 0)) 27 | display.draw_text(0, 23, 'Broadway', broadway, color565(0, 0, 255)) 28 | display.draw_text(0, 36, 'Espresso', espresso_dolce, 29 | color565(0, 255, 255)) 30 | display.draw_text(0, 64, 'Fixed Font 5x8', fixed_font, 31 | color565(255, 0, 255)) 32 | display.draw_text(0, 76, 'Neato 5x7', neato, color565(255, 255, 0)) 33 | display.draw_text(0, 85, 'Robotron 7x11', robotron, 34 | color565(255, 255, 255)) 35 | display.draw_text(0, 96, 'Unispace', unispace, color565(255, 128, 0)) 36 | display.draw_text(0, 120, 'Wendy 7x8', wendy, color565(255, 0, 128)) 37 | 38 | sleep(9) 39 | display.clear() 40 | 41 | display.draw_text(0, 0, 'Arcade Pix 9x11', arcadepix, 42 | color565(255, 0, 0), 43 | landscape=True) 44 | display.draw_text(12, 0, 'Bally 7x9', bally, color565(0, 255, 0), 45 | landscape=True) 46 | display.draw_text(23, 0, 'Broadway', broadway, color565(0, 0, 255), 47 | landscape=True) 48 | display.draw_text(36, 0, 'Espresso', espresso_dolce, 49 | color565(0, 255, 255), landscape=True) 50 | display.draw_text(64, 0, 'Fixed Font 5x8', fixed_font, 51 | color565(255, 0, 255), landscape=True) 52 | display.draw_text(76, 0, 'Neato 5x7', neato, color565(255, 255, 0), 53 | landscape=True) 54 | display.draw_text(85, 0, 'Robotron 7x11', robotron, 55 | color565(255, 255, 255), 56 | landscape=True) 57 | display.draw_text(96, 0, 'Unispace', unispace, color565(255, 128, 0), 58 | landscape=True) 59 | display.draw_text(120, 0, 'Wendy 7x8', wendy, color565(255, 0, 128), 60 | landscape=True) 61 | 62 | sleep(9) 63 | display.clear() 64 | 65 | display.draw_text(0, 0, 'Arcade Pix 9x11', arcadepix, color565(255, 0, 0), 66 | background=color565(0, 255, 255)) 67 | display.draw_text(0, 12, 'Bally 7x9', bally, color565(0, 255, 0), 68 | background=color565(0, 0, 128)) 69 | display.draw_text(0, 23, 'Broadway', broadway, color565(0, 0, 255), 70 | background=color565(255, 255, 0)) 71 | display.draw_text(0, 36, 'Espresso', espresso_dolce, 72 | color565(0, 255, 255), background=color565(255, 0, 0)) 73 | display.draw_text(0, 64, 'Fixed Font 5x8', fixed_font, 74 | color565(255, 0, 255), background=color565(0, 128, 0)) 75 | display.draw_text(0, 76, 'Neato 5x7', neato, color565(255, 255, 0), 76 | background=color565(0, 0, 255)) 77 | display.draw_text(0, 85, 'Robotron 7x11', robotron, 78 | color565(255, 255, 255), 79 | background=color565(128, 128, 128)) 80 | display.draw_text(0, 96, 'Unispace', unispace, color565(255, 128, 0), 81 | background=color565(0, 128, 255)) 82 | display.draw_text(0, 120, 'Wendy 7x8', wendy, color565(255, 0, 128), 83 | background=color565(255, 255, 255)) 84 | 85 | sleep(9) 86 | display.cleanup() 87 | 88 | 89 | test() 90 | -------------------------------------------------------------------------------- /demo_fonts_8x8.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (fonts 8x8).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI # type: ignore 5 | 6 | 7 | def test(): 8 | """Test code.""" 9 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 10 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 11 | 12 | display.draw_text8x8(0, 0, 'Built-in', color565(255, 0, 255)) 13 | display.draw_text8x8(16, 16, 'MicroPython', color565(255, 255, 0)) 14 | display.draw_text8x8(32, 32, '8x8 Font', color565(0, 0, 255)) 15 | display.draw_text8x8(63, 120, "Portrait", color565(0, 255, 0)) 16 | display.draw_text8x8(0, 56, "Landscape", color565(255, 0, 0), 17 | landscape=True) 18 | 19 | sleep(9) 20 | display.cleanup() 21 | 22 | 23 | test() 24 | -------------------------------------------------------------------------------- /demo_fonts_8x8_bgcolor.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (fonts 8x8 background color).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI # type: ignore 5 | 6 | 7 | def test(): 8 | """Test code.""" 9 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 10 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 11 | 12 | display.draw_text8x8(0, 0, 'Built-in', color565(255, 0, 0)) 13 | display.fill_rectangle(0, 10, 95, 12, color565(255, 0, 0)) 14 | display.draw_text8x8(0, 12, 'Built-in', color565(0, 0, 0), 15 | color565(255, 0, 0)) 16 | 17 | display.draw_text8x8(0, 28, 'MicroPython', color565(0, 255, 0)) 18 | display.fill_rectangle(0, 38, 95, 12, color565(0, 255, 0)) 19 | display.draw_text8x8(0, 40, 'MicroPython', color565(0, 0, 0), 20 | color565(0, 255, 0)) 21 | 22 | display.draw_text8x8(0, 56, '8x8 Font', color565(0, 0, 255)) 23 | display.fill_rectangle(0, 66, 95, 12, color565(0, 0, 255)) 24 | display.draw_text8x8(0, 68, '8x8 Font', color565(0, 0, 0), 25 | color565(0, 0, 255)) 26 | 27 | 28 | display.draw_text8x8(0, 105, 'No Background', color565(255, 255, 255)) 29 | display.fill_rectangle(0, 115, 105, 12, color565(255, 255, 255)) 30 | display.draw_text8x8(0, 117, 'No Background', color565(255, 255, 255)) 31 | 32 | 33 | display.draw_text8x8(display.width - 29, 0, "Landscape", 34 | color565(255, 255, 255), landscape=True) 35 | display.fill_rectangle(display.width - 19, 0, 18, 128, 36 | color565(255, 128, 0)) 37 | display.draw_text8x8(display.width - 14, 0, "Landscape", 38 | color565(255, 255, 255), 39 | background=color565(255, 128, 0), 40 | landscape=True) 41 | 42 | sleep(15) 43 | display.cleanup() 44 | 45 | 46 | test() 47 | -------------------------------------------------------------------------------- /demo_fonts_flipped.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (fonts).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | from xglcd_font import XglcdFont 6 | 7 | 8 | def test(): 9 | """Test code.""" 10 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 11 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 12 | 13 | display.clear() 14 | 15 | print("Loading font, please wait.") 16 | arcadepix = XglcdFont('fonts/ArcadePix9x11.c', 9, 11) 17 | print("Font loaded.") 18 | 19 | # Portrait 20 | w=arcadepix.measure_text('Portrait') # Measure length of text in pixels 21 | center = int(display.width / 2 - w / 2) # Calculate position for centered text 22 | display.draw_text(center, display.height - arcadepix.height, 'Portrait', arcadepix, color565(0, 255, 0)) 23 | sleep(1) 24 | 25 | # Portrait flipped upside down 26 | w = arcadepix.measure_text('Flipped') 27 | display.draw_text(display.width - w, 0, 'Flipped', arcadepix, color565(0, 255, 255),flip=True) 28 | sleep(1) 29 | 30 | # Landscape 31 | w = arcadepix.measure_text('Landscape') 32 | display.draw_text(display.height - arcadepix.height, display.width - w, 'Landscape', arcadepix, 33 | color565(255, 255, 0), landscape=True) 34 | sleep(1) 35 | 36 | # Landscape flipped upside down 37 | display.draw_text(0, 0, 'Flipped Landscape', arcadepix, color565(255, 0, 255),landscape=True, flip=True) 38 | 39 | sleep(9) 40 | display.cleanup() 41 | 42 | 43 | test() 44 | -------------------------------------------------------------------------------- /demo_fonts_trans.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (fonts-transparent).""" 2 | from time import sleep 3 | from ssd1351 import Display, color565 4 | from machine import Pin, SPI 5 | from xglcd_font import XglcdFont 6 | 7 | 8 | def test(): 9 | """Test code.""" 10 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 11 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 12 | 13 | display.draw_image('images/Tabby128x128.raw', 0, 0, 128, 128) 14 | 15 | print("Loading fonts, please wait.") 16 | fixed_font = XglcdFont('fonts/FixedFont5x8.c', 5, 8) 17 | unispace = XglcdFont('fonts/Unispace12x24.c', 12, 24) 18 | print("Fonts loaded.") 19 | 20 | display.draw_text(0, 0, 'Not transparent', fixed_font, 21 | color565(255, 0, 255)) 22 | display.draw_text(0, 80, 'Transparent', unispace, color565(0, 128, 255), 23 | spacing=0, transparent=True) 24 | display.draw_text(0, 103, 'Background', unispace, color565(0, 128, 255), 25 | color565(255, 255, 255), spacing=0) 26 | display.draw_text(103, 20, 'Test', unispace, color565(0, 255, 128), 27 | landscape=True, spacing=2, transparent=True) 28 | display.draw_text(0, 20, 'Test', unispace, color565(128, 255, 0), 29 | landscape=True) 30 | 31 | 32 | 33 | 34 | 35 | sleep(9) 36 | display.cleanup() 37 | 38 | 39 | test() 40 | -------------------------------------------------------------------------------- /demo_framebuffer.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (framebuffer). 2 | 3 | Notes: May require device with PSRAM 4 | """ 5 | from ssd1351 import Display, color565 6 | from struct import pack, unpack 7 | from framebuf import FrameBuffer, RGB565 # type: ignore 8 | from machine import Pin, SPI # type: ignore 9 | from time import sleep 10 | 11 | 12 | def test(): 13 | """Test code.""" 14 | # Baud rate of 40000000 seems about the max 15 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 16 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 17 | display.clear() 18 | 19 | # Load background and convert to bytearray for framebuf compatiblility 20 | background = bytearray( 21 | display.load_sprite('images/XP_background128x128.raw', 128, 128)) 22 | # Create frame buffer for background 23 | background_fb = FrameBuffer(background, 128, 128, RGB565) 24 | 25 | # Load ostrich sprite and convert to bytearray for framebuf compatibility 26 | ostrich = bytearray( 27 | display.load_sprite('images/Ostrich65x64.raw', 65, 64)) 28 | # Create frame buffer for foreground ostrich 29 | ostrich_fb = FrameBuffer(ostrich, 65, 64, RGB565) 30 | 31 | # Get X,Y coordinates to center ostrich on screen 32 | x = (display.width - 65) // 2 33 | y = (display.height - 64) // 2 34 | 35 | # Need to swap endian for the key color 36 | key = unpack('>H', pack(' 6: 80 | self.frame = 4 81 | elif self.facing == LEFT and self.frame > 3: 82 | self.frame = 1 83 | 84 | def update_pos(self, room): 85 | """Update Mario's position. 86 | Args: 87 | room (obj): Mario's current room 88 | """ 89 | x = self.x 90 | y = self.y 91 | w = self.w 92 | h = self.h 93 | border = BORDER_WIDTH 94 | screen_width = self.screen_width 95 | screen_height = self.screen_height 96 | self.prev_x = x 97 | self.prev_y = y 98 | if self.walking: 99 | # Check for collision 100 | collision = room.check_collision(x, y, w, h, self.direction) 101 | # Check for walking (Mario 13x15px top left is origin) 102 | if self.direction == UP: 103 | if y < border: 104 | # Move room up 105 | self.y = screen_height - border - h 106 | self.prev_y = self.y 107 | return [room.room_x, room.room_y - 1] 108 | elif not collision: 109 | self.y -= 1 110 | self.advance_frame() 111 | return [room.room_x, room.room_y] 112 | elif self.direction == DOWN: 113 | if y > screen_height - (h + border): 114 | # Move room down 115 | self.y = border 116 | self.prev_y = self.y 117 | return [room.room_x, room.room_y + 1] 118 | elif not collision: 119 | self.y += 1 120 | self.advance_frame() 121 | return [room.room_x, room.room_y] 122 | elif self.direction == LEFT: 123 | if x < border: 124 | # Move room left 125 | self.x = screen_width - border - w 126 | self.prev_x = self.x 127 | return [room.room_x - 1, room.room_y] 128 | elif not collision: 129 | self.x -= 1 130 | if self.facing == LEFT: 131 | self.advance_frame() 132 | else: 133 | self.facing = LEFT 134 | self.frame = 1 135 | return [room.room_x, room.room_y] 136 | elif self.direction == RIGHT: 137 | if x > screen_width - (w + border): 138 | # Move room right 139 | self.x = border 140 | self.prev_x = self.x 141 | return [room.room_x + 1, room.room_y] 142 | elif not collision: 143 | self.x += 1 144 | if self.facing == RIGHT: 145 | self.advance_frame() 146 | else: 147 | self.facing = RIGHT 148 | self.frame = 4 149 | return [room.room_x, room.room_y] 150 | # Stop 151 | if self.facing == LEFT: 152 | self.frame = 1 153 | else: 154 | self.frame = 4 155 | return [room.room_x, room.room_y] 156 | 157 | def draw(self): 158 | """Draw sprite.""" 159 | x = self.x 160 | y = self.y 161 | prev_x = self.prev_x 162 | prev_y = self.prev_y 163 | w = self.w 164 | h = self.h 165 | 166 | # Determine direction and remove previous portion of sprite 167 | if prev_x > x: 168 | # Left 169 | self.display.fill_vrect(x + w, prev_y, 1, h, 0) 170 | elif prev_x < x: 171 | # Right 172 | self.display.fill_vrect(x - 1, prev_y, 1, h, 0) 173 | if prev_y > y: 174 | # Upward 175 | self.display.fill_vrect(prev_x, y + h, w, 1, 0) 176 | elif prev_y < y: 177 | # Downward 178 | self.display.fill_vrect(prev_x, y - 1, w, 1, 0) 179 | 180 | size = self.w * self.h * 2 181 | offset = size * (self.frame - 1) 182 | self.display.draw_sprite(self.buf[offset: offset + size], x, y, w, h) 183 | 184 | def clear(self): 185 | """Clear sprite.""" 186 | self.display.fill_rectangle(self.x, self.y, self.w, self.h, 0) 187 | 188 | 189 | class Room(object): 190 | """Generate and track all walls in a room.""" 191 | def __init__(self, room_x, room_y, max_room_x, max_room_y, screen_width, 192 | screen_height, display): 193 | """Initialize room. 194 | Args: 195 | room_x, room_y (int): Current room grid coordinates 196 | max_room_x, max_room_y (int): Maximum rooms in X,Y plane 197 | screen_width (int): Width of screen. 198 | screen_height (int): Width of height. 199 | display (SSD1351): OLED display object. 200 | Notes: 201 | Rooms are laid out on an 16x16 grid. 202 | """ 203 | self.room_x = room_x 204 | self.room_y = room_y 205 | self.max_room_x = max_room_x 206 | self.max_room_y = max_room_y 207 | self.screen_width = screen_width 208 | self.screen_height = screen_height 209 | self.display = display 210 | self.walls = [] 211 | self.generate_walls() 212 | 213 | def two_bits(self, n): 214 | """Breaks 16 bit binary number into bit pairs. 215 | Args: 216 | n (int): Number to split into double bits. 217 | """ 218 | mask = 0b11 219 | for i in range(8): 220 | yield n & mask 221 | n >>= 2 222 | 223 | def generate_walls(self): 224 | """Generate room walls.""" 225 | outer_pillars = [[0, 0, 1], [25, 0, 1], [75, 0, 1], [100, 0, 1], 226 | [125, 0, 2], [125, 84, 2], [125, 126, 3], 227 | [100, 126, 3], [50, 126, 3], [25, 126, 3], 228 | [0, 126, 0], [0, 42, 0]] 229 | inner_pillars = [[25, 42], [50, 42], [75, 42], [100, 42], [25, 84], 230 | [50, 84], [75, 84], [100, 84]] 231 | 232 | # Seed random to room coordinates so rooms are unique 233 | seed(self.room_x | (self.room_y << 4)) 234 | r = randint(0, 65536) 235 | # Set room color 236 | self.color = ROOM_COLORS[r >> 2 & 0b111] 237 | # Locked doors 238 | door_north = [50, 0, 1] 239 | door_east = [125, 42, 2] 240 | door_south = [75, 126, 3] 241 | door_west = [0, 84, 0] 242 | if self.room_x == 0: 243 | self.walls.append(Wall(door_west, self.color, self.display)) 244 | if self.room_y == 0: 245 | self.walls.append(Wall(door_north, self.color, self.display)) 246 | if self.room_x >= self.max_room_x - 1: 247 | self.walls.append(Wall(door_east, self.color, self.display)) 248 | if self.room_y >= self.max_room_y - 1: 249 | self.walls.append(Wall(door_south, self.color, self.display)) 250 | 251 | # Outer walls 252 | for pillar in outer_pillars: 253 | self.walls.append(Wall(pillar, self.color, self.display)) 254 | 255 | # Inner walls 256 | room_inner_dirs = list(self.two_bits(r)) 257 | for index, coords in enumerate(inner_pillars): 258 | pillar = [coords[0], coords[1], room_inner_dirs[index]] 259 | self.walls.append(Wall(pillar, self.color, self.display)) 260 | 261 | def check_collision(self, obj_left, obj_top, obj_width, obj_height, 262 | direction): 263 | """Check if object is colliding with items in room. 264 | Args: 265 | obj_left, obj_top (int): object origin coordinates 266 | obj_width, object_height (int): object dimensions 267 | direction (int): direction object is travelling 268 | """ 269 | obj_right = obj_left + obj_width - 1 270 | obj_bottom = obj_top + obj_height - 1 271 | # Check all walls 272 | for wall in self.walls: 273 | if wall.intersects(obj_left, obj_top, obj_right, obj_bottom, 274 | direction): 275 | return True 276 | return False 277 | 278 | 279 | class Wall(object): 280 | """A solid wall.""" 281 | def __init__(self, pillar, color, display): 282 | """Initialize wall. 283 | Args: 284 | pillar ([int]): [X coord, Y coord, direction] 285 | display (SSD1351): OLED display object. 286 | color (int): RGB565 color 287 | """ 288 | x, y, direction = pillar 289 | self.color = color 290 | if direction == NORTH: 291 | self.w = BORDER_WIDTH 292 | self.h = WALL_VERT_LENGTH 293 | self.left = x 294 | self.top = y - WALL_VERT_LENGTH + 2 295 | elif direction == EAST: 296 | self.w = WALL_HORIZ_LENGTH 297 | self.h = BORDER_WIDTH 298 | self.left = x 299 | self.top = y 300 | elif direction == SOUTH: 301 | self.w = BORDER_WIDTH 302 | self.h = WALL_VERT_LENGTH 303 | self.left = x 304 | self.top = y 305 | elif direction == WEST: 306 | self.w = WALL_HORIZ_LENGTH 307 | self.h = BORDER_WIDTH 308 | self.left = x - WALL_HORIZ_LENGTH + 2 309 | self.top = y 310 | else: 311 | print('Invalid direction: {0:b}'.format(direction)) 312 | 313 | self.right = self.left + self.w - 1 314 | self.bottom = self.top + self.h - 1 315 | self.draw_wall(display) 316 | 317 | def draw_wall(self, display): 318 | """Draw wall. 319 | Args: 320 | display (SSD1351): OLED display object. 321 | """ 322 | display.fill_rectangle(self.left, self.top, self.w, self.h, self.color) 323 | 324 | def intersects(self, obj_left, obj_top, obj_right, obj_bottom, direction): 325 | """Determine if object intersects wall. 326 | Args: 327 | obj_left, obj_top, obj_right, obj_bottom(int): object boundaries 328 | direction (int): direction object is travelling 329 | """ 330 | if direction == UP: 331 | # Object travelling UP 332 | if (obj_left <= self.right and obj_right >= self.left and 333 | obj_top - 1 == self.bottom): 334 | return True 335 | else: 336 | return False 337 | elif direction == DOWN: 338 | # Object travelling DOWN 339 | if (obj_left <= self.right and obj_right >= self.left and 340 | obj_bottom + 1 == self.top): 341 | return True 342 | else: 343 | return False 344 | elif direction == LEFT: 345 | # Object travelling LEFT 346 | if (obj_top <= self.bottom and obj_bottom >= self.top and 347 | obj_left - 1 == self.right): 348 | return True 349 | else: 350 | return False 351 | elif direction == RIGHT: 352 | # Object travelling RIGHT 353 | if (obj_top <= self.bottom and obj_bottom >= self.top and 354 | obj_right + 1 == self.left): 355 | return True 356 | else: 357 | return False 358 | else: 359 | # Unknown 360 | return False 361 | 362 | # Initialize Mario 363 | mario = Mario('images/Mario13x96.raw', 13, 96, 127, 128, 6, display) 364 | # Create first room 365 | room = Room(START_ROOM_X, START_ROOM_Y, 16, 16, 127, 128, display) 366 | mario.update_pos(room) 367 | mario.draw() 368 | uart_server = UARTServer() 369 | 370 | while True: 371 | uart_server.start_advertising() 372 | # Wait for BLE connection 373 | while not uart_server.connected: 374 | pass 375 | 376 | while uart_server.connected: 377 | timer = monotonic() 378 | if uart_server.in_waiting: # Check for BLE packets 379 | packet = Packet.from_stream(uart_server) 380 | if isinstance(packet, ButtonPacket): 381 | if packet.pressed: # Gamepad pressed 382 | # Walking 383 | mario.walking = True 384 | mario.direction = packet.button 385 | else: 386 | # Stopped 387 | mario.walking = False 388 | # Draw standing still 389 | mario.update_pos(room) 390 | mario.draw() 391 | # Draw Mario waling 392 | if mario.walking: 393 | room_x, room_y = mario.update_pos(room) 394 | if [room_x, room_y] != [room.room_x, room.room_y]: 395 | # room.changed 396 | display.clear() 397 | room = Room(room_x, room_y, 16, 16, 127, 128, display) 398 | mario.draw() 399 | 400 | # Adjust speed to 30 FPS 401 | timer_dif = .033333333 - (monotonic() - timer) 402 | if timer_dif > 0: 403 | sleep(timer_dif) 404 | -------------------------------------------------------------------------------- /demo_pbm.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (PBM - Portable Bitmap). 2 | 3 | This demo is based on code provided by MimiVRC 4 | """ 5 | from ssd1351 import Display, color565 6 | from struct import pack, unpack 7 | from framebuf import FrameBuffer, MONO_HLSB, RGB565 # type: ignore 8 | from machine import Pin, SPI # type: ignore 9 | from time import sleep 10 | 11 | 12 | def create_palette(foreground, background=0, invert=False): 13 | """Create framebuffer palette to translate between MONO_HLSB and RGB565. 14 | 15 | Args: 16 | foreground(int): Foreground color in RGB656 format 17 | background(int): Background color in RGB656 format (default Black) 18 | invert(bool): Invert foreground and background (default False) 19 | Returns: 20 | FrameBuffer: Color palette 21 | """ 22 | # Need to swap endian colors 23 | foreground = unpack('>H', pack('H', pack('= self.screen_width: 47 | self.x_speed = -x_speed 48 | elif x - x_speed < 0: 49 | self.x_speed = x_speed 50 | 51 | if y + h + y_speed >= self.screen_height: 52 | self.y_speed = -y_speed 53 | elif y - y_speed <= 0: 54 | self.y_speed = y_speed 55 | 56 | self.prev_x = x 57 | self.prev_y = y 58 | 59 | self.x = x + self.x_speed 60 | self.y = y + self.y_speed 61 | 62 | def draw(self): 63 | """Draw sprite.""" 64 | x = self.x 65 | y = self.y 66 | prev_x = self.prev_x 67 | prev_y = self.prev_y 68 | w = self.w 69 | h = self.h 70 | x_speed = abs(self.x_speed) 71 | y_speed = abs(self.y_speed) 72 | 73 | # Determine direction and remove previous portion of sprite 74 | if prev_x > x: 75 | # Left 76 | self.display.fill_vrect(x + w, prev_y, x_speed, h, 0) 77 | elif prev_x < x: 78 | # Right 79 | self.display.fill_vrect(x - x_speed, prev_y, x_speed, h, 0) 80 | if prev_y > y: 81 | # Upward 82 | self.display.fill_vrect(prev_x, y + h, w, y_speed, 0) 83 | elif prev_y < y: 84 | # Downward 85 | self.display.fill_vrect(prev_x, y - y_speed, w, y_speed, 0) 86 | 87 | self.display.draw_sprite(self.buf, x, y, w, h) 88 | 89 | 90 | def test(): 91 | """Bouncing sprite.""" 92 | try: 93 | # Baud rate of 14500000 seems about the max 94 | spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 95 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 96 | display.clear() 97 | 98 | # Load sprite 99 | logo = BouncingSprite('images/Python41x49.raw', 100 | 41, 49, 128, 128, 1, display) 101 | 102 | while True: 103 | timer = ticks_us() 104 | logo.update_pos() 105 | logo.draw() 106 | # Attempt to set framerate to 30 FPS 107 | timer_dif = 33333 - ticks_diff(ticks_us(), timer) 108 | if timer_dif > 0: 109 | sleep_us(timer_dif) 110 | 111 | except KeyboardInterrupt: 112 | display.cleanup() 113 | 114 | 115 | test() 116 | -------------------------------------------------------------------------------- /demo_sprite_framebuffer.py: -------------------------------------------------------------------------------- 1 | """SSD1351 demo (sprite framebuffer). 2 | 3 | Notes: Will likely require device with PSRAM. 4 | """ 5 | from framebuf import FrameBuffer, RGB565 # type: ignore 6 | from machine import Pin, SPI # type: ignore 7 | from ssd1351 import Display, color565 8 | from struct import pack, unpack 9 | from utime import sleep_us, ticks_us, ticks_diff # type: ignore 10 | 11 | 12 | class SpriteFrameBuffer(object): 13 | """Sprite Frame Buffer.""" 14 | 15 | def __init__(self, sprite_path, background_path, 16 | w, h, speed, display): 17 | """Initialize sprite. 18 | 19 | Args: 20 | sprite_path (string): Path of sprite image. 21 | background_path (string): Path of background image. 22 | w, h (int): Width and height of sprite. 23 | speed(int): Initial XY-Speed of sprite. 24 | display (SSD1351): OLED display object. 25 | """ 26 | self.w = w 27 | self.h = h 28 | self.x_speed = speed 29 | self.y_speed = speed 30 | self.display = display 31 | self.screen_width = display.width 32 | self.screen_height = display.height 33 | self.x = 0 # Starting X coordinate 34 | self.y = self.screen_height // 4 # Starting Y coordinate 35 | # Set up back buffer 36 | back_buffer = bytearray(self.screen_width * self.screen_height * 2) 37 | # Create frame buffer for back buffer 38 | self.back_buffer_fb = FrameBuffer(back_buffer, self.screen_width, 39 | self.screen_height, RGB565) 40 | # Load background and convert to bytearray for framebuf compatiblility 41 | background = bytearray( 42 | display.load_sprite(background_path, self.screen_width, 43 | self.screen_height)) 44 | # Create frame buffer for background 45 | self.background_fb = FrameBuffer(background, self.screen_width, 46 | self.screen_height, RGB565) 47 | # Load sprite & convert to bytearray for framebuf compatibility 48 | sprite = bytearray( 49 | display.load_sprite(sprite_path, self.w, self.h)) 50 | # Create frame buffer for foreground sprite 51 | self.sprite_fb = FrameBuffer(sprite, self.w, self.h, RGB565) 52 | 53 | # Need to swap endian for the key color 54 | self.key = unpack('>H', pack('= self.screen_width: 66 | self.x_speed = -x_speed 67 | elif x - x_speed < 0: 68 | self.x_speed = x_speed 69 | 70 | if y + h + y_speed >= self.screen_height: 71 | self.y_speed = -y_speed 72 | elif y - y_speed <= 0: 73 | self.y_speed = y_speed 74 | 75 | self.x = x + self.x_speed 76 | self.y = y + self.y_speed 77 | 78 | def draw(self): 79 | """Draw sprite.""" 80 | # Draw background to back buffer 81 | self.back_buffer_fb.blit(self.background_fb, 0, 0) 82 | # Draw sprite to back buffer 83 | self.back_buffer_fb.blit(self.sprite_fb, self.x, self.y, self.key) 84 | # Draw back buffer to display 85 | self.display.draw_sprite(self.back_buffer_fb, 0, 0, 86 | self.screen_width, self.screen_height) 87 | 88 | 89 | def test(): 90 | """Bouncing sprite.""" 91 | try: 92 | # Baud rate of 14500000 seems about the max 93 | # spi = SPI(2, baudrate=14500000, sck=Pin(18), mosi=Pin(23)) 94 | spi = SPI(1, baudrate=14500000, sck=Pin(12), mosi=Pin(11)) 95 | display = Display(spi, dc=Pin(17), cs=Pin(5), rst=Pin(16)) 96 | display.contrast(15) # Set maximum brightness 97 | 98 | # Load sprite 99 | logo = SpriteFrameBuffer('images/Ostrich65x64.raw', 100 | 'images/XP_background128x128.raw', 101 | 65, 64, 1, display) 102 | 103 | while True: 104 | timer = ticks_us() 105 | logo.update_pos() 106 | logo.draw() 107 | # Attempt to set framerate to 30 FPS 108 | timer_dif = 33333 - ticks_diff(ticks_us(), timer) 109 | if timer_dif > 0: 110 | sleep_us(timer_dif) 111 | 112 | except KeyboardInterrupt: 113 | display.cleanup() 114 | 115 | 116 | test() 117 | -------------------------------------------------------------------------------- /fonts/ArcadePix9x11.c: -------------------------------------------------------------------------------- 1 | 2 | //WARNING: This Font Require X-GLCD Lib. 3 | // You can not use it with MikroE GLCD Lib. 4 | 5 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 6 | //MikroElektronika 2011 7 | //http://www.mikroe.com 8 | 9 | //GLCD FontName : Arcadepix9x11 10 | //Based on a font created by Reekee of Dimenzioned - reekee@00.co.uk 11 | //GLCD FontSize : 9 x 11 12 | 13 | const unsigned short Arcadepix9x11[] = { 14 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 15 | 0x03, 0xBE, 0x01, 0xBE, 0x01, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 16 | 0x07, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " 17 | 0x07, 0x00, 0x00, 0x48, 0x00, 0xFC, 0x00, 0x48, 0x00, 0xFC, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # 18 | 0x06, 0x98, 0x00, 0xA4, 0x00, 0xA6, 0x01, 0xA4, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ 19 | 0x08, 0x04, 0x00, 0x8A, 0x00, 0x44, 0x00, 0x20, 0x00, 0x10, 0x00, 0x88, 0x00, 0x44, 0x01, 0x80, 0x00, 0x00, 0x00, // Code for char % 20 | 0x07, 0xC0, 0x00, 0xE4, 0x01, 0x3E, 0x01, 0x32, 0x01, 0x4C, 0x01, 0xC4, 0x00, 0xA0, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char & 21 | 0x02, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 22 | 0x03, 0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( 23 | 0x03, 0x02, 0x01, 0xFE, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) 24 | 0x06, 0x00, 0x00, 0xAC, 0x00, 0x70, 0x00, 0xFE, 0x01, 0x78, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char * 25 | 0x07, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFC, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 26 | 0x03, 0x00, 0x02, 0x80, 0x03, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 27 | 0x07, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 28 | 0x02, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 29 | 0x06, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / 30 | 0x08, 0x38, 0x00, 0xFC, 0x00, 0x84, 0x00, 0x02, 0x01, 0x02, 0x01, 0x06, 0x01, 0xFC, 0x00, 0x38, 0x00, 0x00, 0x00, // Code for char 0 31 | 0x07, 0x00, 0x01, 0x04, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char 1 32 | 0x08, 0x84, 0x01, 0xC6, 0x01, 0xE2, 0x01, 0x62, 0x01, 0x62, 0x01, 0x72, 0x01, 0x3E, 0x01, 0x0C, 0x01, 0x00, 0x00, // Code for char 2 33 | 0x08, 0x80, 0x00, 0x82, 0x01, 0x22, 0x01, 0x22, 0x01, 0x32, 0x01, 0x3E, 0x01, 0xE6, 0x01, 0xC2, 0x00, 0x00, 0x00, // Code for char 3 34 | 0x08, 0x60, 0x00, 0x70, 0x00, 0x4C, 0x00, 0x44, 0x00, 0x46, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x40, 0x00, 0x00, 0x00, // Code for char 4 35 | 0x08, 0x8E, 0x00, 0x8E, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0xFA, 0x01, 0xE2, 0x00, 0x00, 0x00, // Code for char 5 36 | 0x08, 0xF8, 0x00, 0xFC, 0x01, 0x26, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0xE2, 0x01, 0xC2, 0x00, 0x00, 0x00, // Code for char 6 37 | 0x08, 0x06, 0x00, 0x06, 0x00, 0xC2, 0x01, 0xE2, 0x01, 0x22, 0x00, 0x1A, 0x00, 0x0E, 0x00, 0x06, 0x00, 0x00, 0x00, // Code for char 7 38 | 0x08, 0xCC, 0x00, 0x3E, 0x01, 0x32, 0x01, 0x22, 0x01, 0x22, 0x01, 0x32, 0x01, 0xCC, 0x01, 0xC0, 0x00, 0x00, 0x00, // Code for char 8 39 | 0x08, 0x0C, 0x00, 0x3E, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0xA2, 0x01, 0xFE, 0x00, 0x7C, 0x00, 0x00, 0x00, // Code for char 9 40 | 0x02, 0x98, 0x01, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 41 | 0x03, 0x00, 0x02, 0x98, 0x03, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 42 | 0x05, 0x00, 0x00, 0x20, 0x00, 0x70, 0x00, 0xCC, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < 43 | 0x07, 0x00, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = 44 | 0x05, 0x00, 0x00, 0x84, 0x00, 0xCC, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > 45 | 0x08, 0x0C, 0x00, 0x0E, 0x00, 0x02, 0x05, 0x02, 0x05, 0x82, 0x00, 0xC2, 0x00, 0x7E, 0x00, 0x1C, 0x00, 0x00, 0x00, // Code for char ? 46 | 0x09, 0x00, 0x00, 0xF8, 0x00, 0x04, 0x01, 0x72, 0x02, 0x8A, 0x02, 0x8A, 0x02, 0x92, 0x00, 0xE2, 0x00, 0xFC, 0x01, // Code for char @ 47 | 0x08, 0xF8, 0x01, 0xFC, 0x01, 0x46, 0x00, 0x42, 0x00, 0x42, 0x00, 0x46, 0x00, 0xFC, 0x01, 0xF8, 0x01, 0x00, 0x00, // Code for char A 48 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0xFE, 0x01, 0xCC, 0x00, 0x00, 0x00, // Code for char B 49 | 0x08, 0x38, 0x00, 0xFC, 0x00, 0x86, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x86, 0x01, 0x84, 0x00, 0x00, 0x00, // Code for char C 50 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x86, 0x01, 0xFC, 0x00, 0x70, 0x00, 0x00, 0x00, // Code for char D 51 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0x02, 0x01, 0x00, 0x00, // Code for char E 52 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x02, 0x00, 0x00, 0x00, // Code for char F 53 | 0x08, 0x70, 0x00, 0xFC, 0x00, 0x86, 0x01, 0x02, 0x01, 0x02, 0x01, 0x22, 0x01, 0xE2, 0x01, 0xE2, 0x01, 0x00, 0x00, // Code for char G 54 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, // Code for char H 55 | 0x07, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char I 56 | 0x08, 0xC0, 0x00, 0xC0, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFE, 0x01, 0xFE, 0x00, 0x00, 0x00, // Code for char J 57 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x60, 0x00, 0x70, 0x00, 0xD8, 0x00, 0xCC, 0x01, 0x86, 0x01, 0x02, 0x01, 0x00, 0x00, // Code for char K 58 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // Code for char L 59 | 0x08, 0x00, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x1C, 0x00, 0x38, 0x00, 0x1C, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, // Code for char M 60 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, // Code for char N 61 | 0x08, 0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0xFC, 0x00, 0x00, 0x00, // Code for char O 62 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x7E, 0x00, 0x1C, 0x00, 0x00, 0x00, // Code for char P 63 | 0x08, 0xFC, 0x00, 0xFE, 0x01, 0x02, 0x01, 0x42, 0x01, 0x42, 0x01, 0xC2, 0x01, 0xFE, 0x00, 0x7C, 0x01, 0x00, 0x00, // Code for char Q 64 | 0x08, 0xFE, 0x01, 0xFE, 0x01, 0x42, 0x00, 0x42, 0x00, 0xC2, 0x00, 0xF2, 0x01, 0xBE, 0x01, 0x3C, 0x01, 0x00, 0x00, // Code for char R 65 | 0x08, 0x8C, 0x00, 0xBE, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0x01, 0x26, 0x01, 0xE4, 0x01, 0xC0, 0x00, 0x00, 0x00, // Code for char S 66 | 0x07, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T 67 | 0x08, 0xFE, 0x00, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFE, 0x01, 0xFE, 0x00, 0x00, 0x00, // Code for char U 68 | 0x08, 0x00, 0x00, 0x3E, 0x00, 0x7E, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xE0, 0x00, 0x7E, 0x00, 0x3E, 0x00, 0x00, 0x00, // Code for char V 69 | 0x08, 0x00, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0xE0, 0x00, 0x38, 0x00, 0xE0, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, // Code for char W 70 | 0x07, 0x86, 0x01, 0xCE, 0x01, 0xFC, 0x00, 0x38, 0x00, 0xFC, 0x00, 0xCE, 0x01, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char X 71 | 0x06, 0x1E, 0x00, 0x3E, 0x00, 0xE0, 0x01, 0xE0, 0x01, 0x3E, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y 72 | 0x08, 0x82, 0x01, 0xC2, 0x01, 0xE2, 0x01, 0x72, 0x01, 0x3A, 0x01, 0x1E, 0x01, 0x0E, 0x01, 0x06, 0x01, 0x00, 0x00, // Code for char Z 73 | 0x04, 0xFE, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ 74 | 0x06, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash 75 | 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] 76 | 0x07, 0x10, 0x00, 0x18, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ 77 | 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, // Code for char _ 78 | 0x05, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` 79 | 0x07, 0xC0, 0x00, 0xE4, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a 80 | 0x07, 0xFE, 0x01, 0xFE, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF8, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b 81 | 0x07, 0xF8, 0x00, 0xFC, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x8C, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c 82 | 0x07, 0xF0, 0x00, 0xF8, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char d 83 | 0x07, 0xF0, 0x00, 0xFC, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x01, 0x7C, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e 84 | 0x06, 0x08, 0x00, 0xFC, 0x01, 0xFE, 0x01, 0x0A, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char f 85 | 0x07, 0xF8, 0x00, 0xFC, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFC, 0x07, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, // Code for char g 86 | 0x07, 0xFE, 0x01, 0xFE, 0x01, 0x18, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x01, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char h 87 | 0x03, 0x04, 0x00, 0xFD, 0x01, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i 88 | 0x05, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0xFD, 0x07, 0xFD, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j 89 | 0x06, 0xFE, 0x01, 0xFE, 0x01, 0x40, 0x00, 0xE0, 0x00, 0xB8, 0x01, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k 90 | 0x03, 0x02, 0x00, 0xFE, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l 91 | 0x08, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0x01, 0x7C, 0x00, 0xF8, 0x00, 0x7C, 0x00, 0xFC, 0x01, 0xF8, 0x01, 0x00, 0x00, // Code for char m 92 | 0x07, 0xFC, 0x01, 0xFC, 0x01, 0x0C, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x01, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char n 93 | 0x07, 0xF8, 0x00, 0xFC, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o 94 | 0x07, 0xFC, 0x07, 0xFC, 0x07, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFC, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p 95 | 0x07, 0xF8, 0x00, 0xFC, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFC, 0x07, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, // Code for char q 96 | 0x07, 0xFC, 0x01, 0xFC, 0x01, 0x0C, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char r 97 | 0x07, 0x88, 0x00, 0xBC, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, 0xE4, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s 98 | 0x05, 0x04, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char t 99 | 0x07, 0xFC, 0x00, 0xFC, 0x01, 0x00, 0x01, 0x00, 0x01, 0x80, 0x01, 0xFC, 0x01, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char u 100 | 0x06, 0x7C, 0x00, 0xFC, 0x00, 0x80, 0x01, 0x80, 0x01, 0xFC, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v 101 | 0x07, 0xFC, 0x00, 0xFC, 0x01, 0xE0, 0x01, 0xF0, 0x00, 0xE0, 0x01, 0xFC, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char w 102 | 0x07, 0x84, 0x01, 0xCC, 0x01, 0x78, 0x00, 0x30, 0x00, 0x78, 0x00, 0xCC, 0x01, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char x 103 | 0x07, 0xFC, 0x00, 0xFC, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0xFC, 0x07, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, // Code for char y 104 | 0x07, 0x84, 0x01, 0xC4, 0x01, 0xC4, 0x01, 0x64, 0x01, 0x3C, 0x01, 0x1C, 0x01, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char z 105 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { 106 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | 107 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } 108 | 0x08, 0x20, 0x00, 0x38, 0x00, 0x08, 0x00, 0x18, 0x00, 0x20, 0x00, 0x20, 0x00, 0x38, 0x00, 0x08, 0x00, 0x00, 0x00, // Code for char ~ 109 | 0x02, 0xFC, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char  110 | }; 111 | 112 | -------------------------------------------------------------------------------- /fonts/Bally5x8.c: -------------------------------------------------------------------------------- 1 | 2 | //WARNING: This Font Require X-GLCD Lib. 3 | // You can not use it with MikroE GLCD Lib. 4 | 5 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 6 | //MikroElektronika 2011 7 | //http://www.mikroe.com 8 | 9 | //GLCD FontName : Bally5x8 10 | //Created by rdagger based on original Bally Astrocade Basic font 11 | //GLCD FontSize : 5 x 8 12 | 13 | const unsigned short Bally5x8[] = { 14 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 15 | 0x05, 0x00, 0x00, 0x5F, 0x00, 0x00, // Code for char ! 16 | 0x05, 0x00, 0x07, 0x00, 0x07, 0x00, // Code for char " 17 | 0x05, 0x14, 0x7F, 0x14, 0x7F, 0x14, // Code for char # 18 | 0x05, 0x24, 0x2A, 0x6B, 0x2A, 0x12, // Code for char $ 19 | 0x05, 0x23, 0x13, 0x08, 0x64, 0x62, // Code for char % 20 | 0x05, 0x36, 0x49, 0x55, 0x22, 0x50, // Code for char & 21 | 0x05, 0x00, 0x07, 0x07, 0x00, 0x00, // Code for char ' 22 | 0x05, 0x00, 0x3E, 0x41, 0x00, 0x00, // Code for char ( 23 | 0x05, 0x00, 0x00, 0x41, 0x3E, 0x00, // Code for char ) 24 | 0x05, 0x22, 0x14, 0x08, 0x14, 0x22, // Code for char * Multiply Symbol 25 | 0x05, 0x08, 0x08, 0x3E, 0x08, 0x08, // Code for char + 26 | 0x05, 0x58, 0x38, 0x00, 0x00, 0x00, // Code for char , 27 | 0x05, 0x08, 0x08, 0x08, 0x08, 0x08, // Code for char - 28 | 0x05, 0x00, 0x60, 0x60, 0x00, 0x00, // Code for char . 29 | 0x05, 0x20, 0x10, 0x08, 0x04, 0x02, // Code for char / 30 | 0x05, 0x3E, 0x41, 0x41, 0x41, 0x3E, // Code for char 0 31 | 0x05, 0x00, 0x42, 0x7F, 0x40, 0x00, // Code for char 1 32 | 0x05, 0x72, 0x49, 0x49, 0x49, 0x46, // Code for char 2 33 | 0x05, 0x22, 0x41, 0x49, 0x49, 0x36, // Code for char 3 34 | 0x05, 0x18, 0x14, 0x12, 0x7F, 0x10, // Code for char 4 35 | 0x05, 0x27, 0x45, 0x45, 0x45, 0x39, // Code for char 5 36 | 0x05, 0x3C, 0x4A, 0x49, 0x49, 0x30, // Code for char 6 37 | 0x05, 0x01, 0x71, 0x09, 0x05, 0x03, // Code for char 7 38 | 0x05, 0x36, 0x49, 0x49, 0x49, 0x36, // Code for char 8 39 | 0x05, 0x06, 0x49, 0x49, 0x29, 0x1E, // Code for char 9 40 | 0x05, 0x00, 0x36, 0x36, 0x00, 0x00, // Code for char : 41 | 0x05, 0x00, 0x5B, 0x3B, 0x00, 0x00, // Code for char ; 42 | 0x05, 0x08, 0x14, 0x22, 0x41, 0x00, // Code for char < 43 | 0x05, 0x14, 0x14, 0x14, 0x14, 0x14, // Code for char = 44 | 0x05, 0x00, 0x41, 0x22, 0x14, 0x08, // Code for char > 45 | 0x05, 0x02, 0x01, 0x51, 0x09, 0x06, // Code for char ? 46 | 0x05, 0x3E, 0x41, 0x5D, 0x55, 0x1E, // Code for char @ 47 | 0x05, 0x7E, 0x09, 0x09, 0x09, 0x7E, // Code for char A 48 | 0x05, 0x7F, 0x49, 0x49, 0x49, 0x36, // Code for char B 49 | 0x05, 0x3E, 0x41, 0x41, 0x41, 0x22, // Code for char C 50 | 0x05, 0x7F, 0x41, 0x41, 0x41, 0x3E, // Code for char D 51 | 0x05, 0x7F, 0x49, 0x49, 0x41, 0x41, // Code for char E 52 | 0x05, 0x7F, 0x09, 0x09, 0x01, 0x01, // Code for char F 53 | 0x05, 0x3E, 0x41, 0x41, 0x51, 0x72, // Code for char G 54 | 0x05, 0x7F, 0x08, 0x08, 0x08, 0x7F, // Code for char H 55 | 0x05, 0x00, 0x41, 0x7F, 0x41, 0x00, // Code for char I 56 | 0x05, 0x20, 0x40, 0x40, 0x40, 0x3F, // Code for char J 57 | 0x05, 0x7F, 0x08, 0x14, 0x22, 0x41, // Code for char K 58 | 0x05, 0x7F, 0x40, 0x40, 0x40, 0x40, // Code for char L 59 | 0x05, 0x7F, 0x02, 0x0C, 0x02, 0x7F, // Code for char M 60 | 0x05, 0x7F, 0x02, 0x04, 0x08, 0x7F, // Code for char N 61 | 0x05, 0x7F, 0x41, 0x41, 0x41, 0x7F, // Code for char O 62 | 0x05, 0x7F, 0x09, 0x09, 0x09, 0x06, // Code for char P 63 | 0x05, 0x3E, 0x41, 0x51, 0x21, 0x5E, // Code for char Q 64 | 0x05, 0x7F, 0x09, 0x19, 0x29, 0x46, // Code for char R 65 | 0x05, 0x26, 0x49, 0x49, 0x49, 0x32, // Code for char S 66 | 0x05, 0x01, 0x01, 0x7F, 0x01, 0x01, // Code for char T 67 | 0x05, 0x3F, 0x40, 0x40, 0x40, 0x3F, // Code for char U 68 | 0x05, 0x07, 0x18, 0x60, 0x18, 0x07, // Code for char V 69 | 0x05, 0x7F, 0x20, 0x18, 0x20, 0x7F, // Code for char W 70 | 0x05, 0x63, 0x14, 0x08, 0x14, 0x63, // Code for char X 71 | 0x05, 0x03, 0x04, 0x78, 0x04, 0x03, // Code for char Y 72 | 0x05, 0x61, 0x51, 0x49, 0x45, 0x43, // Code for char Z 73 | 0x05, 0x7F, 0x41, 0x41, 0x00, 0x00, // Code for char [ 74 | 0x05, 0x08, 0x08, 0x2A, 0x08, 0x08, // Code for char / Division Symbol 75 | 0x05, 0x00, 0x00, 0x41, 0x41, 0x7F, // Code for char ] 76 | 0x05, 0x04, 0x02, 0x7F, 0x02, 0x04, // Code for char ^ Up Arrow 77 | 0x05, 0x10, 0x20, 0x7F, 0x20, 0x10, // Code for char _ Down Arrow 78 | 0x05, 0x07, 0x05, 0x07, 0x00, 0x00, // Code for char ` Degree 79 | 0x05, 0x20, 0x54, 0x54, 0x54, 0x78, // Code for char a 80 | 0x05, 0x7F, 0x48, 0x44, 0x44, 0x38, // Code for char b 81 | 0x05, 0x38, 0x44, 0x44, 0x44, 0x20, // Code for char c 82 | 0x05, 0x38, 0x44, 0x44, 0x48, 0x7F, // Code for char d 83 | 0x05, 0x38, 0x54, 0x54, 0x54, 0x58, // Code for char e 84 | 0x05, 0x08, 0x7E, 0x09, 0x01, 0x02, // Code for char f 85 | 0x05, 0x0C, 0x52, 0x52, 0x52, 0x3E, // Code for char g 86 | 0x05, 0x7F, 0x08, 0x04, 0x04, 0x78, // Code for char h 87 | 0x05, 0x00, 0x48, 0x7A, 0x40, 0x00, // Code for char i 88 | 0x05, 0x20, 0x40, 0x44, 0x3D, 0x00, // Code for char j 89 | 0x05, 0x7F, 0x10, 0x28, 0x44, 0x00, // Code for char k 90 | 0x05, 0x00, 0x41, 0x7F, 0x40, 0x00, // Code for char l 91 | 0x05, 0x7C, 0x04, 0x18, 0x04, 0x78, // Code for char m 92 | 0x05, 0x7C, 0x08, 0x04, 0x04, 0x78, // Code for char n 93 | 0x05, 0x38, 0x44, 0x44, 0x44, 0x38, // Code for char o 94 | 0x05, 0x7C, 0x14, 0x14, 0x14, 0x08, // Code for char p 95 | 0x05, 0x08, 0x14, 0x14, 0x18, 0x7C, // Code for char q 96 | 0x05, 0x7C, 0x08, 0x04, 0x04, 0x08, // Code for char r 97 | 0x05, 0x48, 0x54, 0x54, 0x54, 0x20, // Code for char s 98 | 0x05, 0x04, 0x3F, 0x44, 0x40, 0x20, // Code for char t 99 | 0x05, 0x3C, 0x40, 0x40, 0x20, 0x7C, // Code for char u 100 | 0x05, 0x1C, 0x20, 0x40, 0x20, 0x1C, // Code for char v 101 | 0x05, 0x3C, 0x40, 0x30, 0x40, 0x3C, // Code for char w 102 | 0x05, 0x44, 0x28, 0x10, 0x28, 0x44, // Code for char x 103 | 0x05, 0x0C, 0x50, 0x50, 0x50, 0x3C, // Code for char y 104 | 0x05, 0x44, 0x64, 0x54, 0x4C, 0x44, // Code for char z 105 | 0x05, 0x08, 0x1C, 0x2A, 0x08, 0x08, // Code for char { Left Arrow 106 | 0x05, 0x00, 0x00, 0x7F, 0x00, 0x00, // Code for char | 107 | 0x05, 0x08, 0x08, 0x2A, 0x1C, 0x08, // Code for char } Right Arrow 108 | 0x05, 0x18, 0x04, 0x08, 0x10, 0x0C, // Code for char ~ 109 | 0x05, 0x3E, 0x00, 0x00, 0x00, 0x00 // Code for char  110 | }; 111 | 112 | -------------------------------------------------------------------------------- /fonts/Bally7x9.c: -------------------------------------------------------------------------------- 1 | 2 | //WARNING: This Font Require X-GLCD Lib. 3 | // You can not use it with MikroE GLCD Lib. 4 | 5 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 6 | //MikroElektronika 2011 7 | //http://www.mikroe.com 8 | 9 | //GLCD FontName : Bally7x9 10 | //Created by rdagger based on original Bally Astrocade Basic font. 11 | //GLCD FontSize : 7 x 9 12 | 13 | const unsigned short Bally7x9[] = { 14 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 15 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 16 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " 17 | 0x06, 0x00, 0x00, 0x28, 0x00, 0xFE, 0x00, 0x28, 0x00, 0xFE, 0x00, 0x28, 0x00, 0x00, 0x00, // Code for char # 18 | 0x06, 0x00, 0x00, 0x48, 0x00, 0x54, 0x00, 0xD6, 0x00, 0x54, 0x00, 0x24, 0x00, 0x00, 0x00, // Code for char $ 19 | 0x06, 0x00, 0x00, 0x46, 0x00, 0x26, 0x00, 0x10, 0x00, 0xC8, 0x00, 0xC4, 0x00, 0x00, 0x00, // Code for char % 20 | 0x06, 0x00, 0x00, 0x6C, 0x00, 0x92, 0x00, 0xAA, 0x00, 0x44, 0x00, 0xA0, 0x00, 0x00, 0x00, // Code for char & 21 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 22 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( 23 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) 24 | 0x06, 0x00, 0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x00, 0x00, // Code for char * 25 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x7C, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char + 26 | 0x03, 0x00, 0x00, 0xB0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 27 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char - 28 | 0x03, 0x00, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 29 | 0x06, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, // Code for char / 30 | 0x06, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x7C, 0x00, 0x00, 0x00, // Code for char 0 31 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0xFE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 32 | 0x06, 0x00, 0x00, 0xE4, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x8C, 0x00, 0x00, 0x00, // Code for char 2 33 | 0x06, 0x00, 0x00, 0x44, 0x00, 0x82, 0x00, 0x92, 0x00, 0x92, 0x00, 0x6C, 0x00, 0x00, 0x00, // Code for char 3 34 | 0x06, 0x00, 0x00, 0x30, 0x00, 0x28, 0x00, 0x24, 0x00, 0xFE, 0x00, 0x20, 0x00, 0x00, 0x00, // Code for char 4 35 | 0x06, 0x00, 0x00, 0x4E, 0x00, 0x8A, 0x00, 0x8A, 0x00, 0x8A, 0x00, 0x72, 0x00, 0x00, 0x00, // Code for char 5 36 | 0x06, 0x00, 0x00, 0x78, 0x00, 0x94, 0x00, 0x92, 0x00, 0x92, 0x00, 0x60, 0x00, 0x00, 0x00, // Code for char 6 37 | 0x06, 0x00, 0x00, 0x02, 0x00, 0xE2, 0x00, 0x12, 0x00, 0x0A, 0x00, 0x06, 0x00, 0x00, 0x00, // Code for char 7 38 | 0x06, 0x00, 0x00, 0x6C, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x6C, 0x00, 0x00, 0x00, // Code for char 8 39 | 0x06, 0x00, 0x00, 0x0C, 0x00, 0x92, 0x00, 0x92, 0x00, 0x52, 0x00, 0x3C, 0x00, 0x00, 0x00, // Code for char 9 40 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 41 | 0x04, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 42 | 0x05, 0x00, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < 43 | 0x06, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x00, 0x00, // Code for char = 44 | 0x06, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char > 45 | 0x06, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0xA2, 0x00, 0x12, 0x00, 0x0C, 0x00, 0x00, 0x00, // Code for char ? 46 | 0x06, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0xBA, 0x00, 0xAA, 0x00, 0x3C, 0x00, 0x00, 0x00, // Code for char @ 47 | 0x06, 0x00, 0x00, 0xFC, 0x00, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0xFC, 0x00, 0x00, 0x00, // Code for char A 48 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x6C, 0x00, 0x00, 0x00, // Code for char B 49 | 0x06, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x44, 0x00, 0x00, 0x00, // Code for char C 50 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x7C, 0x00, 0x00, 0x00, // Code for char D 51 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x92, 0x00, 0x92, 0x00, 0x82, 0x00, 0x82, 0x00, 0x00, 0x00, // Code for char E 52 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x12, 0x00, 0x12, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, // Code for char F 53 | 0x06, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0x82, 0x00, 0xA2, 0x00, 0xE4, 0x00, 0x00, 0x00, // Code for char G 54 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char H 55 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0xFE, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I 56 | 0x06, 0x00, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7E, 0x00, 0x00, 0x00, // Code for char J 57 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x82, 0x00, 0x00, 0x00, // Code for char K 58 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, // Code for char L 59 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x04, 0x00, 0x18, 0x00, 0x04, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char M 60 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char N 61 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char O 62 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x0C, 0x00, 0x00, 0x00, // Code for char P 63 | 0x06, 0x00, 0x00, 0x7C, 0x00, 0x82, 0x00, 0xA2, 0x00, 0x42, 0x00, 0xBC, 0x00, 0x00, 0x00, // Code for char Q 64 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x12, 0x00, 0x32, 0x00, 0x52, 0x00, 0x8C, 0x00, 0x00, 0x00, // Code for char R 65 | 0x06, 0x00, 0x00, 0x4C, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x64, 0x00, 0x00, 0x00, // Code for char S 66 | 0x06, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, // Code for char T 67 | 0x06, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7E, 0x00, 0x00, 0x00, // Code for char U 68 | 0x06, 0x00, 0x00, 0x0E, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x00, 0x00, // Code for char V 69 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char W 70 | 0x06, 0x00, 0x00, 0xC6, 0x00, 0x28, 0x00, 0x10, 0x00, 0x28, 0x00, 0xC6, 0x00, 0x00, 0x00, // Code for char X 71 | 0x06, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0xF0, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00, // Code for char Y 72 | 0x06, 0x00, 0x00, 0xC2, 0x00, 0xA2, 0x00, 0x92, 0x00, 0x8A, 0x00, 0x86, 0x00, 0x00, 0x00, // Code for char Z 73 | 0x04, 0x00, 0x00, 0xFE, 0x00, 0x82, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ 74 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char BackSlash 75 | 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x82, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char ] 76 | 0x06, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0xFE, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, // Code for char ^ 77 | 0x06, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0xFE, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, // Code for char _ 78 | 0x04, 0x00, 0x00, 0x0E, 0x00, 0x0A, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` 79 | 0x06, 0x00, 0x00, 0x40, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0xF0, 0x00, 0x00, 0x00, // Code for char a 80 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x90, 0x00, 0x88, 0x00, 0x88, 0x00, 0x70, 0x00, 0x00, 0x00, // Code for char b 81 | 0x06, 0x00, 0x00, 0x70, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0x40, 0x00, 0x00, 0x00, // Code for char c 82 | 0x06, 0x00, 0x00, 0x70, 0x00, 0x88, 0x00, 0x88, 0x00, 0x90, 0x00, 0xFE, 0x00, 0x00, 0x00, // Code for char d 83 | 0x06, 0x00, 0x00, 0x70, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0xB0, 0x00, 0x00, 0x00, // Code for char e 84 | 0x06, 0x00, 0x00, 0x10, 0x00, 0xFC, 0x00, 0x12, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, // Code for char f 85 | 0x06, 0x00, 0x00, 0x18, 0x00, 0xA4, 0x00, 0xA4, 0x00, 0xA4, 0x00, 0x7C, 0x00, 0x00, 0x00, // Code for char g 86 | 0x06, 0x00, 0x00, 0xFE, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x00, 0x00, 0x00, // Code for char h 87 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0xF4, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i 88 | 0x05, 0x00, 0x00, 0x40, 0x00, 0x80, 0x00, 0x88, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j 89 | 0x05, 0x00, 0x00, 0xFE, 0x00, 0x20, 0x00, 0x50, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k 90 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0xFE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l 91 | 0x06, 0x00, 0x00, 0xF8, 0x00, 0x08, 0x00, 0x30, 0x00, 0x08, 0x00, 0xF0, 0x00, 0x00, 0x00, // Code for char m 92 | 0x06, 0x00, 0x00, 0xF8, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF0, 0x00, 0x00, 0x00, // Code for char n 93 | 0x06, 0x00, 0x00, 0x70, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0x70, 0x00, 0x00, 0x00, // Code for char o 94 | 0x06, 0x00, 0x00, 0xF8, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char p 95 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x28, 0x00, 0x28, 0x00, 0x30, 0x00, 0xF8, 0x00, 0x00, 0x00, // Code for char q 96 | 0x06, 0x00, 0x00, 0xF8, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char r 97 | 0x06, 0x00, 0x00, 0x90, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0xA8, 0x00, 0x40, 0x00, 0x00, 0x00, // Code for char s 98 | 0x06, 0x00, 0x00, 0x08, 0x00, 0x7E, 0x00, 0x88, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, // Code for char t 99 | 0x06, 0x00, 0x00, 0x78, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x00, 0xF8, 0x00, 0x00, 0x00, // Code for char u 100 | 0x06, 0x00, 0x00, 0x38, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x38, 0x00, 0x00, 0x00, // Code for char v 101 | 0x06, 0x00, 0x00, 0x78, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x78, 0x00, 0x00, 0x00, // Code for char w 102 | 0x06, 0x00, 0x00, 0x88, 0x00, 0x50, 0x00, 0x20, 0x00, 0x50, 0x00, 0x88, 0x00, 0x00, 0x00, // Code for char x 103 | 0x06, 0x00, 0x00, 0x18, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x78, 0x00, 0x00, 0x00, // Code for char y 104 | 0x06, 0x00, 0x00, 0x88, 0x00, 0xC8, 0x00, 0xA8, 0x00, 0x98, 0x00, 0x88, 0x00, 0x00, 0x00, // Code for char z 105 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x54, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char { 106 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | 107 | 0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x54, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char } 108 | 0x06, 0x00, 0x00, 0x30, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x18, 0x00, 0x00, 0x00, // Code for char ~ 109 | 0x02, 0x7C, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char  110 | }; 111 | 112 | -------------------------------------------------------------------------------- /fonts/Broadway17x15.c: -------------------------------------------------------------------------------- 1 | //Font Generated by GLCD Font Creator 2 | //Copyright 2007 Pocket MicroTechnics 3 | //http://www.pocketmt.com 4 | 5 | //GLCD FontName : Broadway17x15 6 | //Based on a font by Connormah which is public domain (according to Wikipedia) 7 | //GLCD FontSize : 17 x 15 8 | 9 | const unsigned short Broadway17x15[] = { 10 | 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 11 | 0x06, 0x00, 0x00, 0x1C, 0x04, 0x3E, 0x0E, 0xFE, 0x0E, 0x7E, 0x0E, 0x1C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 12 | 0x06, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " 13 | 0x0B, 0x00, 0x00, 0x90, 0x00, 0x90, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x00, 0x90, 0x00, 0xD0, 0x0F, 0xBE, 0x00, 0x90, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # 14 | 0x09, 0x00, 0x00, 0x3C, 0x04, 0x7C, 0x14, 0xFE, 0x0E, 0xFE, 0x09, 0xF2, 0x0F, 0xFE, 0x0F, 0xC3, 0x07, 0x84, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ 15 | 0x0C, 0x3C, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x42, 0x08, 0x3C, 0x06, 0x80, 0x01, 0x60, 0x00, 0x98, 0x07, 0xC6, 0x0F, 0xC0, 0x0F, 0x40, 0x08, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char % 16 | 0x0C, 0x00, 0x07, 0xBC, 0x0C, 0x7C, 0x08, 0xFE, 0x09, 0xFA, 0x0B, 0xF2, 0x07, 0xF2, 0x0F, 0xCC, 0x0F, 0x00, 0x0F, 0x80, 0x0E, 0x40, 0x0C, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char & 17 | 0x03, 0x00, 0x00, 0x3E, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 18 | 0x05, 0x00, 0x00, 0xF8, 0x0F, 0xFC, 0x1F, 0xFE, 0x3F, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( 19 | 0x05, 0x00, 0x00, 0x02, 0x20, 0xFE, 0x3F, 0xFC, 0x1F, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) 20 | 0x05, 0x04, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x2C, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char * 21 | 0x09, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xF0, 0x07, 0xF0, 0x07, 0xF0, 0x07, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 22 | 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x2E, 0x00, 0x2E, 0x00, 0x3E, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 23 | 0x06, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 24 | 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 25 | 0x07, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x03, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / 26 | 0x09, 0x00, 0x00, 0xF0, 0x01, 0xFC, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x0C, 0x06, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 0 27 | 0x08, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xFC, 0x0F, 0xFC, 0x0F, 0xFC, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 28 | 0x09, 0x38, 0x08, 0x04, 0x0C, 0x02, 0x0F, 0xC2, 0x0F, 0xF2, 0x0F, 0xFE, 0x0F, 0xFE, 0x09, 0x7C, 0x08, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 29 | 0x09, 0x00, 0x04, 0x04, 0x08, 0x02, 0x08, 0x22, 0x08, 0xFE, 0x0F, 0xDE, 0x0F, 0xDE, 0x0F, 0xDC, 0x07, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 3 30 | 0x0B, 0x00, 0x02, 0x00, 0x03, 0x80, 0x02, 0x40, 0x02, 0xE0, 0x0F, 0xF0, 0x0F, 0xF8, 0x0F, 0xFC, 0x0F, 0xFE, 0x0F, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 4 31 | 0x09, 0xC0, 0x03, 0x08, 0x04, 0x0E, 0x08, 0x0A, 0x08, 0xFA, 0x0F, 0xFA, 0x0F, 0xFA, 0x0F, 0xF2, 0x07, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 5 32 | 0x09, 0x00, 0x00, 0xF0, 0x01, 0xFC, 0x07, 0xFC, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x22, 0x08, 0x24, 0x04, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 6 33 | 0x0A, 0x02, 0x00, 0x02, 0x08, 0x02, 0x0E, 0x82, 0x0F, 0xE2, 0x0F, 0xFA, 0x0F, 0xFE, 0x0F, 0xFE, 0x01, 0x3E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 34 | 0x09, 0x00, 0x00, 0x38, 0x07, 0xFC, 0x08, 0xFE, 0x08, 0xFE, 0x09, 0xF2, 0x0D, 0xE2, 0x0F, 0xFC, 0x07, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 8 35 | 0x09, 0x00, 0x00, 0x78, 0x00, 0x84, 0x04, 0x82, 0x08, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x07, 0xFC, 0x07, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 36 | 0x06, 0x00, 0x00, 0x20, 0x04, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 37 | 0x06, 0x00, 0x00, 0x20, 0x0C, 0x70, 0x2E, 0x70, 0x2E, 0x70, 0x3E, 0x20, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 38 | 0x08, 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0xE0, 0x00, 0xF0, 0x01, 0xD0, 0x01, 0x88, 0x03, 0x8C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < 39 | 0x0A, 0x00, 0x00, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = 40 | 0x07, 0x3C, 0x06, 0x38, 0x02, 0x70, 0x01, 0xF0, 0x01, 0xE0, 0x00, 0xC0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > 41 | 0x09, 0x00, 0x00, 0x0C, 0x00, 0x04, 0x04, 0x02, 0x0E, 0xFE, 0x0E, 0x7E, 0x0E, 0x7E, 0x04, 0x7C, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ? 42 | 0x0C, 0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0xE4, 0x04, 0xF2, 0x0D, 0x12, 0x09, 0xD2, 0x09, 0xF2, 0x09, 0xF2, 0x09, 0x04, 0x09, 0x8C, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char @ 43 | 0x0D, 0x00, 0x08, 0x00, 0x06, 0x00, 0x05, 0xC0, 0x04, 0x70, 0x04, 0xF8, 0x05, 0xFE, 0x07, 0xF8, 0x0F, 0xF0, 0x0F, 0xC0, 0x0F, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char A 44 | 0x0A, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x82, 0x08, 0x84, 0x0C, 0x78, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char B 45 | 0x0B, 0x00, 0x00, 0xF0, 0x01, 0xF8, 0x03, 0xFC, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x08, 0x02, 0x04, 0x04, 0x06, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char C 46 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x08, 0x04, 0x04, 0x08, 0x02, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char D 47 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x12, 0x08, 0x12, 0x08, 0x12, 0x08, 0x12, 0x08, 0x12, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char E 48 | 0x0A, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char F 49 | 0x0B, 0x00, 0x00, 0xF0, 0x01, 0xF8, 0x03, 0xFC, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x42, 0x08, 0x44, 0x04, 0x48, 0x02, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char G 50 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char H 51 | 0x06, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I 52 | 0x09, 0x00, 0x06, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x07, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char J 53 | 0x0C, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x08, 0x00, 0x0C, 0x00, 0x34, 0x00, 0xC2, 0x00, 0x02, 0x03, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char K 54 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char L 55 | 0x0F, 0x00, 0x0C, 0x80, 0x03, 0xF0, 0x00, 0xFE, 0x01, 0xFC, 0x03, 0xF8, 0x07, 0xF0, 0x03, 0xC0, 0x00, 0xC0, 0x00, 0xF0, 0x07, 0xF8, 0x0F, 0xFE, 0x0F, 0xF0, 0x0F, 0x80, 0x0F, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, // Code for char M 56 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0x7C, 0x00, 0xFC, 0x00, 0xF8, 0x00, 0xF8, 0x01, 0xF0, 0x03, 0xF0, 0x03, 0xE0, 0x07, 0xC0, 0x07, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char N 57 | 0x0B, 0x00, 0x00, 0xF0, 0x01, 0xF8, 0x03, 0xFC, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x08, 0x04, 0x04, 0x08, 0x02, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char O 58 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x02, 0x02, 0x02, 0x04, 0x02, 0x0C, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char P 59 | 0x0B, 0x00, 0x00, 0xF0, 0x01, 0xF8, 0x03, 0xFC, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x0A, 0x04, 0x0C, 0x08, 0x0E, 0xF0, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Q 60 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x01, 0x02, 0x06, 0x04, 0x0E, 0x0C, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char R 61 | 0x09, 0x00, 0x00, 0x38, 0x04, 0x7C, 0x08, 0xFE, 0x08, 0xFE, 0x0B, 0xFA, 0x0F, 0xE2, 0x0F, 0xC4, 0x07, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char S 62 | 0x0B, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T 63 | 0x0B, 0x00, 0x00, 0xFE, 0x03, 0xFE, 0x07, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x04, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char U 64 | 0x0D, 0x02, 0x00, 0x0E, 0x00, 0x1E, 0x00, 0x7E, 0x00, 0xFE, 0x01, 0xFE, 0x03, 0xFC, 0x0F, 0xF0, 0x03, 0xC0, 0x01, 0x60, 0x00, 0x10, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char V 65 | 0x10, 0x02, 0x00, 0x1E, 0x00, 0xFE, 0x00, 0xFE, 0x03, 0xFE, 0x1F, 0xFE, 0x07, 0xF0, 0x03, 0xC0, 0x00, 0xF0, 0x00, 0xF8, 0x03, 0xFE, 0x07, 0xF8, 0x1F, 0xF0, 0x03, 0xE0, 0x00, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, // Code for char W 66 | 0x0C, 0x02, 0x08, 0x0E, 0x04, 0x1E, 0x03, 0xFE, 0x00, 0xFE, 0x01, 0xFE, 0x03, 0xFC, 0x0F, 0xF0, 0x0F, 0xD8, 0x0F, 0x04, 0x0F, 0x02, 0x0E, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char X 67 | 0x0C, 0x02, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x3E, 0x00, 0x7E, 0x08, 0xFE, 0x06, 0xFC, 0x01, 0xF8, 0x00, 0x30, 0x00, 0x10, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y 68 | 0x0B, 0x00, 0x08, 0x02, 0x0E, 0x82, 0x0F, 0xE2, 0x0F, 0xFA, 0x0F, 0xFE, 0x0F, 0xFE, 0x0B, 0xFE, 0x08, 0x3E, 0x08, 0x0E, 0x08, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Z 69 | 0x06, 0x00, 0x00, 0xFE, 0x3F, 0xFE, 0x3F, 0xFE, 0x3F, 0x02, 0x20, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ 70 | 0x07, 0x02, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash 71 | 0x05, 0x02, 0x20, 0x02, 0x20, 0xFE, 0x3F, 0xFE, 0x3F, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] 72 | 0x08, 0xC0, 0x00, 0xF0, 0x00, 0xF8, 0x00, 0x3E, 0x00, 0x1C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ 73 | 0x08, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char _ 74 | 0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` 75 | 0x0A, 0x00, 0x00, 0x80, 0x07, 0xD0, 0x0F, 0xC8, 0x0F, 0xC8, 0x0F, 0x48, 0x08, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a 76 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x10, 0x04, 0x08, 0x08, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x07, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b 77 | 0x08, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0x08, 0x08, 0x18, 0x04, 0x30, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c 78 | 0x0B, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0x08, 0x08, 0x10, 0x04, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char d 79 | 0x09, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0x88, 0x08, 0xF8, 0x08, 0xF0, 0x04, 0xE0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e 80 | 0x07, 0x08, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFF, 0x0F, 0xFF, 0x0F, 0x09, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char f 81 | 0x08, 0x00, 0x00, 0xE0, 0x2D, 0xF0, 0x4F, 0xF8, 0x4F, 0x08, 0x4E, 0xF8, 0x6F, 0xF4, 0x3D, 0xE0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char g 82 | 0x0B, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char h 83 | 0x05, 0x00, 0x00, 0xFB, 0x0F, 0xFB, 0x0F, 0xFB, 0x0F, 0xFB, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i 84 | 0x05, 0x00, 0x10, 0xFB, 0x1F, 0xFB, 0x1F, 0xFB, 0x1F, 0xFB, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j 85 | 0x0D, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xC0, 0x00, 0xE0, 0x01, 0xF0, 0x07, 0xF0, 0x0F, 0x88, 0x0F, 0x08, 0x0F, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k 86 | 0x05, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l 87 | 0x11, 0x00, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x0F, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x0F, // Code for char m 88 | 0x0B, 0x00, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char n 89 | 0x09, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x10, 0x04, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o 90 | 0x0B, 0x00, 0x00, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0x10, 0x02, 0x08, 0x04, 0xF8, 0x07, 0xF8, 0x07, 0xF0, 0x03, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p 91 | 0x0B, 0x00, 0x00, 0xE0, 0x03, 0xF0, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0x08, 0x08, 0x10, 0x04, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char q 92 | 0x08, 0x00, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char r 93 | 0x08, 0x70, 0x04, 0xF0, 0x0C, 0xF8, 0x09, 0xE8, 0x09, 0xC8, 0x0B, 0xC8, 0x0F, 0x98, 0x07, 0x10, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s 94 | 0x07, 0x08, 0x00, 0xFC, 0x07, 0xFC, 0x0F, 0xFE, 0x0F, 0xFE, 0x0F, 0x08, 0x0C, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char t 95 | 0x0B, 0x00, 0x00, 0xF8, 0x07, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x08, 0x00, 0x08, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char u 96 | 0x0A, 0x08, 0x00, 0x18, 0x00, 0x78, 0x00, 0xF8, 0x01, 0xF8, 0x03, 0xE0, 0x0F, 0xC0, 0x03, 0xC0, 0x00, 0x30, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v 97 | 0x0E, 0x08, 0x00, 0x38, 0x00, 0xF8, 0x00, 0xF8, 0x03, 0xF8, 0x0F, 0xE0, 0x07, 0x80, 0x01, 0xC0, 0x00, 0xF0, 0x01, 0xF8, 0x07, 0xF0, 0x0F, 0xC0, 0x01, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char w 98 | 0x0B, 0x08, 0x08, 0x18, 0x04, 0x38, 0x02, 0xF8, 0x01, 0xF8, 0x01, 0xF0, 0x07, 0xC0, 0x0F, 0xA0, 0x0F, 0x10, 0x0E, 0x08, 0x0C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char x 99 | 0x0A, 0x08, 0x00, 0x18, 0x00, 0x38, 0x08, 0xF8, 0x08, 0xF8, 0x09, 0xF0, 0x07, 0xC0, 0x01, 0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char y 100 | 0x0B, 0x00, 0x08, 0x08, 0x0C, 0x08, 0x0E, 0x88, 0x0F, 0xC8, 0x0F, 0xE8, 0x0F, 0xF8, 0x09, 0xF8, 0x08, 0x78, 0x08, 0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char z 101 | 0x08, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x7C, 0x1F, 0x7E, 0x3F, 0x7E, 0x3F, 0x02, 0x20, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { 102 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x7F, 0xFE, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | 103 | 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x02, 0x20, 0x7E, 0x3F, 0x7E, 0x3F, 0x7C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } 104 | 0x09, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x60, 0x00, 0x60, 0x00, 0xE0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char ~ 105 | }; -------------------------------------------------------------------------------- /fonts/FixedFont5x8.c: -------------------------------------------------------------------------------- 1 | // Generic 8 bit fixed width font 2 | // 5 x 8 pixels 3 | // Start at ASCII 32 4 | 5 | 0x05,0x00,0x00,0x00,0x00,0x00, // Code for char SPACE 6 | 0x05,0x00,0x00,0x5f,0x00,0x00, // Code for char ! 7 | 0x05,0x00,0x07,0x00,0x07,0x00, // Code for char " 8 | 0x05,0x14,0x7f,0x14,0x7f,0x14, // Code for char # 9 | 0x05,0x24,0x2a,0x7f,0x2a,0x12, // Code for char $ 10 | 0x05,0x23,0x13,0x08,0x64,0x62, // Code for char % 11 | 0x05,0x36,0x49,0x56,0x20,0x50, // Code for char & 12 | 0x05,0x00,0x08,0x07,0x03,0x00, // Code for char ' 13 | 0x05,0x00,0x1c,0x22,0x41,0x00, // Code for char ( 14 | 0x05,0x00,0x41,0x22,0x1c,0x00, // Code for char ) 15 | 0x05,0x2a,0x1c,0x7f,0x1c,0x2a, // Code for char * 16 | 0x05,0x08,0x08,0x3e,0x08,0x08, // Code for char + 17 | 0x05,0x00,0x80,0x70,0x30,0x00, // Code for char 18 | 0x05,0x08,0x08,0x08,0x08,0x08, // Code for char - 19 | 0x05,0x00,0x00,0x60,0x60,0x00, // Code for char . 20 | 0x05,0x20,0x10,0x08,0x04,0x02, // Code for char / 21 | 0x05,0x3e,0x51,0x49,0x45,0x3e, // Code for char 0 22 | 0x05,0x00,0x42,0x7f,0x40,0x00, // Code for char 1 23 | 0x05,0x72,0x49,0x49,0x49,0x46, // Code for char 2 24 | 0x05,0x21,0x41,0x49,0x4d,0x33, // Code for char 3 25 | 0x05,0x18,0x14,0x12,0x7f,0x10, // Code for char 4 26 | 0x05,0x27,0x45,0x45,0x45,0x39, // Code for char 5 27 | 0x05,0x3c,0x4a,0x49,0x49,0x31, // Code for char 6 28 | 0x05,0x41,0x21,0x11,0x09,0x07, // Code for char 7 29 | 0x05,0x36,0x49,0x49,0x49,0x36, // Code for char 8 30 | 0x05,0x46,0x49,0x49,0x29,0x1e, // Code for char 9 31 | 0x05,0x00,0x00,0x14,0x00,0x00, // Code for char : 32 | 0x05,0x00,0x40,0x34,0x00,0x00, // Code for char ; 33 | 0x05,0x00,0x08,0x14,0x22,0x41, // Code for char < 34 | 0x05,0x14,0x14,0x14,0x14,0x14, // Code for char = 35 | 0x05,0x00,0x41,0x22,0x14,0x08, // Code for char > 36 | 0x05,0x02,0x01,0x59,0x09,0x06, // Code for char ? 37 | 0x05,0x3e,0x41,0x5d,0x59,0x4e, // Code for char @ 38 | 0x05,0x7c,0x12,0x11,0x12,0x7c, // Code for char A 39 | 0x05,0x7f,0x49,0x49,0x49,0x36, // Code for char B 40 | 0x05,0x3e,0x41,0x41,0x41,0x22, // Code for char C 41 | 0x05,0x7f,0x41,0x41,0x41,0x3e, // Code for char D 42 | 0x05,0x7f,0x49,0x49,0x49,0x41, // Code for char E 43 | 0x05,0x7f,0x09,0x09,0x09,0x01, // Code for char F 44 | 0x05,0x3e,0x41,0x41,0x51,0x73, // Code for char G 45 | 0x05,0x7f,0x08,0x08,0x08,0x7f, // Code for char H 46 | 0x05,0x00,0x41,0x7f,0x41,0x00, // Code for char I 47 | 0x05,0x20,0x40,0x41,0x3f,0x01, // Code for char J 48 | 0x05,0x7f,0x08,0x14,0x22,0x41, // Code for char K 49 | 0x05,0x7f,0x40,0x40,0x40,0x40, // Code for char L 50 | 0x05,0x7f,0x02,0x1c,0x02,0x7f, // Code for char M 51 | 0x05,0x7f,0x04,0x08,0x10,0x7f, // Code for char N 52 | 0x05,0x3e,0x41,0x41,0x41,0x3e, // Code for char O 53 | 0x05,0x7f,0x09,0x09,0x09,0x06, // Code for char P 54 | 0x05,0x3e,0x41,0x51,0x21,0x5e, // Code for char Q 55 | 0x05,0x7f,0x09,0x19,0x29,0x46, // Code for char R 56 | 0x05,0x26,0x49,0x49,0x49,0x32, // Code for char S 57 | 0x05,0x03,0x01,0x7f,0x01,0x03, // Code for char T 58 | 0x05,0x3f,0x40,0x40,0x40,0x3f, // Code for char U 59 | 0x05,0x1f,0x20,0x40,0x20,0x1f, // Code for char V 60 | 0x05,0x3f,0x40,0x38,0x40,0x3f, // Code for char W 61 | 0x05,0x63,0x14,0x08,0x14,0x63, // Code for char X 62 | 0x05,0x03,0x04,0x78,0x04,0x03, // Code for char Y 63 | 0x05,0x61,0x59,0x49,0x4d,0x43, // Code for char Z 64 | 0x05,0x00,0x7f,0x41,0x41,0x41, // Code for char [ 65 | 0x05,0x02,0x04,0x08,0x10,0x20, // Code for char BackSlash 66 | 0x05,0x00,0x41,0x41,0x41,0x7f, // Code for char ] 67 | 0x05,0x04,0x02,0x01,0x02,0x04, // Code for char ^ 68 | 0x05,0x40,0x40,0x40,0x40,0x40, // Code for char _ 69 | 0x05,0x00,0x03,0x07,0x08,0x00, // Code for char ` 70 | 0x05,0x20,0x54,0x54,0x78,0x40, // Code for char a 71 | 0x05,0x7f,0x28,0x44,0x44,0x38, // Code for char b 72 | 0x05,0x38,0x44,0x44,0x44,0x28, // Code for char c 73 | 0x05,0x38,0x44,0x44,0x28,0x7f, // Code for char d 74 | 0x05,0x38,0x54,0x54,0x54,0x18, // Code for char e 75 | 0x05,0x00,0x08,0x7e,0x09,0x02, // Code for char f 76 | 0x05,0x18,0xa4,0xa4,0x9c,0x78, // Code for char g 77 | 0x05,0x7f,0x08,0x04,0x04,0x78, // Code for char h 78 | 0x05,0x00,0x44,0x7d,0x40,0x00, // Code for char i 79 | 0x05,0x20,0x40,0x40,0x3d,0x00, // Code for char j 80 | 0x05,0x7f,0x10,0x28,0x44,0x00, // Code for char k 81 | 0x05,0x00,0x41,0x7f,0x40,0x00, // Code for char l 82 | 0x05,0x7c,0x04,0x78,0x04,0x78, // Code for char m 83 | 0x05,0x7c,0x08,0x04,0x04,0x78, // Code for char n 84 | 0x05,0x38,0x44,0x44,0x44,0x38, // Code for char o 85 | 0x05,0xfc,0x18,0x24,0x24,0x18, // Code for char p 86 | 0x05,0x18,0x24,0x24,0x18,0xfc, // Code for char q 87 | 0x05,0x7c,0x08,0x04,0x04,0x08, // Code for char r 88 | 0x05,0x48,0x54,0x54,0x54,0x24, // Code for char s 89 | 0x05,0x04,0x04,0x3f,0x44,0x24, // Code for char t 90 | 0x05,0x3c,0x40,0x40,0x20,0x7c, // Code for char u 91 | 0x05,0x1c,0x20,0x40,0x20,0x1c, // Code for char v 92 | 0x05,0x3c,0x40,0x30,0x40,0x3c, // Code for char w 93 | 0x05,0x44,0x28,0x10,0x28,0x44, // Code for char x 94 | 0x05,0x4c,0x90,0x90,0x90,0x7c, // Code for char y 95 | 0x05,0x44,0x64,0x54,0x4c,0x44, // Code for char z 96 | 0x05,0x00,0x08,0x36,0x41,0x00, // Code for char { 97 | 0x05,0x00,0x00,0x77,0x00,0x00, // Code for char | 98 | 0x05,0x00,0x41,0x36,0x08,0x00, // Code for char } 99 | 0x05,0x02,0x01,0x02,0x04,0x02, // Code for char ~ 100 | 0x05,0x3c,0x26,0x23,0x26,0x3c, // Code for char DEL 101 | -------------------------------------------------------------------------------- /fonts/Neato5x7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/fonts/Neato5x7.c -------------------------------------------------------------------------------- /fonts/NeatoReduced5x7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/fonts/NeatoReduced5x7.c -------------------------------------------------------------------------------- /fonts/Robotron13x21.c: -------------------------------------------------------------------------------- 1 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 2 | //MikroElektronika 2011 3 | //http://www.mikroe.com 4 | 5 | //GLCD FontName : Robotron13x21 6 | //GLCD FontSize : 13 x 21 (62 characters) 7 | 8 | const unsigned short Robotron13x21[] = { 9 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 10 | 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 11 | 0x08, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " 12 | 0x0D, 0x80, 0x73, 0x00, 0x80, 0x73, 0x00, 0x80, 0x73, 0x00, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0x80, 0x73, 0x00, 0x80, 0x73, 0x00, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0x80, 0x73, 0x00, 0x80, 0x73, 0x00, // Code for char # 13 | 0x0D, 0xFC, 0xE3, 0x03, 0xFC, 0xE3, 0x03, 0xFC, 0xE3, 0x03, 0x9C, 0xE3, 0x03, 0x9C, 0xE3, 0x03, 0x9F, 0x83, 0x1F, 0x9F, 0x83, 0x1F, 0x9F, 0x83, 0x1F, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, // Code for char $ 14 | 0x0B, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char % 15 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, // Code for char & 16 | 0x03, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 17 | 0x08, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( 18 | 0x08, 0x03, 0x00, 0x1C, 0x03, 0x00, 0x1C, 0x03, 0x00, 0x1C, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) 19 | 0x0D, 0x60, 0x1C, 0x00, 0x60, 0x1C, 0x00, 0x60, 0x1C, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0xFC, 0x7F, 0x00, 0xFC, 0x7F, 0x00, 0xFC, 0x7F, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x60, 0x1C, 0x00, 0x60, 0x1C, 0x00, 0x60, 0x1C, 0x00, // Code for char * 20 | 0x08, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0xE0, 0x1F, 0x00, 0xE0, 0x1F, 0x00, 0xE0, 0x1F, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 21 | 0x03, 0x00, 0x80, 0x1F, 0x00, 0x80, 0x1F, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 22 | 0x08, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 23 | 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 24 | 0x05, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / 25 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char 0 26 | 0x0B, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 27 | 0x0D, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, // Code for char 2 28 | 0x0D, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char 3 29 | 0x0D, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0xE0, 0xFF, 0x03, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, // Code for char 4 30 | 0x0D, 0xFC, 0x83, 0x03, 0xFC, 0x83, 0x03, 0xFC, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x1C, 0x83, 0x03, 0x00, 0x83, 0x03, 0x00, 0xFF, 0x03, 0x00, 0xFF, 0x03, // Code for char 5 31 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, // Code for char 6 32 | 0x0D, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x60, 0x00, 0x1C, 0x60, 0x00, 0x1C, 0x60, 0x00, 0x1C, 0x1C, 0x00, 0x1C, 0x1C, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, // Code for char 7 33 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char 8 34 | 0x0D, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char 9 35 | 0x03, 0x80, 0x83, 0x03, 0x80, 0x83, 0x03, 0x80, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 36 | 0x03, 0x80, 0x03, 0x1F, 0x80, 0x03, 0x1F, 0x80, 0x03, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 37 | 0x08, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < 38 | 0x08, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0xE0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = 39 | 0x08, 0xE0, 0x60, 0x00, 0xE0, 0x60, 0x00, 0xE0, 0x60, 0x00, 0xE0, 0x60, 0x00, 0xE0, 0x60, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > 40 | 0x0D, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x1C, 0x9C, 0x03, 0x1C, 0x9C, 0x03, 0x1C, 0x9C, 0x03, 0x1C, 0x1C, 0x00, 0x1C, 0x1C, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, // Code for char ? 41 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, 0x1C, 0x9C, 0x03, 0x1C, 0x9C, 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, 0xFC, 0x9F, 0x03, // Code for char @ 42 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char A 43 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0x83, 0x03, 0xFC, 0x83, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, // Code for char B 44 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, // Code for char C 45 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xE0, 0x7F, 0x00, 0xE0, 0x7F, 0x00, 0xE0, 0x7F, 0x00, // Code for char D 46 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, // Code for char E 47 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, // Code for char F 48 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xFC, 0x9C, 0x03, 0xFC, 0x9C, 0x03, 0xFC, 0xFC, 0x03, 0xFC, 0xFC, 0x03, 0xFC, 0xFC, 0x03, // Code for char G 49 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char H 50 | 0x05, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I 51 | 0x0D, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char J 52 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, // Code for char K 53 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, // Code for char L 54 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char M 55 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char N 56 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char O 57 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, // Code for char P 58 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0xE0, 0x1F, 0x1C, 0xE0, 0x1F, 0x1C, 0xE0, 0x1F, 0x1C, 0xE0, 0x1F, 0x1C, 0xE0, 0x1F, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char Q 59 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0x9C, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, // Code for char R 60 | 0x0D, 0xFC, 0xE3, 0x03, 0xFC, 0xE3, 0x03, 0xFC, 0xE3, 0x03, 0x9C, 0xE3, 0x03, 0x9C, 0xE3, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, // Code for char S 61 | 0x0D, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x9C, 0xFF, 0x03, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, // Code for char T 62 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char U 63 | 0x0D, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x7F, 0x00, 0xFC, 0x7F, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0xFC, 0x1F, 0x00, 0xFC, 0x1F, 0x00, // Code for char V 64 | 0x0D, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0xE0, 0x03, 0x00, 0xE0, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0x03, // Code for char W 65 | 0x0D, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0xE0, 0x70, 0x00, 0xE0, 0x70, 0x00, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, 0x1C, 0x80, 0x03, // Code for char X 66 | 0x0D, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0xFF, 0x03, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, // Code for char Y 67 | 0x0D, 0xFC, 0x80, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0xE0, 0x03, 0xFC, 0xE0, 0x03, 0x1C, 0x9C, 0x03, 0x1C, 0x9C, 0x03, 0x1C, 0x9C, 0x03, 0x9C, 0x83, 0x03, 0x9C, 0x83, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0x80, 0x03, 0xFC, 0x80, 0x03, // Code for char Z 68 | 0x08, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x07, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ 69 | 0x05, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x00, 0xFC, 0x03, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash 70 | 0x08, 0x03, 0x00, 0x1C, 0x03, 0x00, 0x1C, 0x03, 0x00, 0x1C, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char ] 71 | }; 72 | 73 | -------------------------------------------------------------------------------- /fonts/Robotron7x11.c: -------------------------------------------------------------------------------- 1 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 2 | //MikroElektronika 2011 3 | //http://www.mikroe.com 4 | 5 | //GLCD FontName : Robotron7x11 6 | //GLCD FontSize : 7 x 11 7 | 8 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 | 0x02, 0x00, 0x00, 0x7C, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 10 | 0x05, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " 11 | 0x07, 0x10, 0x01, 0xF8, 0x03, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xF8, 0x03, 0x10, 0x01, // Code for char # 12 | 0x07, 0x9C, 0x03, 0x94, 0x03, 0x94, 0x03, 0x17, 0x06, 0x14, 0x02, 0x14, 0x02, 0xF4, 0x03, // Code for char $ 13 | 0x06, 0x0C, 0x00, 0xC0, 0x03, 0x3C, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x00, 0x03, 0x00, 0x00, // Code for char % 14 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x02, 0x60, 0x02, 0x60, 0x02, 0xE0, 0x03, // Code for char & 15 | 0x02, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 16 | 0x05, 0x00, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char ( 17 | 0x05, 0x00, 0x00, 0x03, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, // Code for char ) 18 | 0x07, 0x68, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFC, 0x01, 0x10, 0x00, 0x10, 0x00, 0x68, 0x00, // Code for char * 19 | 0x05, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x78, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 20 | 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 21 | 0x05, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 22 | 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 23 | 0x03, 0xC0, 0x03, 0xC0, 0x03, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / 24 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0xFC, 0x03, // Code for char 0 25 | 0x07, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x04, 0x02, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, // Code for char 1 26 | 0x07, 0xF0, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x1C, 0x00, // Code for char 2 27 | 0x07, 0x00, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xFC, 0x03, // Code for char 3 28 | 0x07, 0x7C, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03, 0x40, 0x00, // Code for char 4 29 | 0x07, 0x7C, 0x02, 0x74, 0x02, 0x74, 0x02, 0x74, 0x02, 0x74, 0x02, 0x70, 0x02, 0xF0, 0x03, // Code for char 5 30 | 0x07, 0xFC, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xF0, 0x03, // Code for char 6 31 | 0x07, 0x04, 0x02, 0x84, 0x01, 0x44, 0x00, 0x44, 0x00, 0x34, 0x00, 0x34, 0x00, 0x1C, 0x00, // Code for char 7 32 | 0x07, 0xFC, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xFC, 0x03, // Code for char 8 33 | 0x07, 0x1C, 0x00, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xFC, 0x03, // Code for char 9 34 | 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 35 | 0x02, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 36 | 0x05, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char < 37 | 0x05, 0x00, 0x00, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = 38 | 0x05, 0x00, 0x00, 0x98, 0x01, 0x98, 0x01, 0x98, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > 39 | 0x07, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x44, 0x02, 0x44, 0x00, 0x44, 0x00, 0x7C, 0x00, // Code for char ? 40 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x7C, 0x02, 0x44, 0x02, 0x44, 0x02, 0x7C, 0x02, // Code for char @ 41 | 0x07, 0xFC, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0xFC, 0x03, 0xFC, 0x03, // Code for char A 42 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x02, 0x1C, 0x02, 0x1C, 0x02, 0xF0, 0x03, // Code for char B 43 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, // Code for char C 44 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0xF8, 0x01, // Code for char D 45 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, // Code for char E 46 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, // Code for char F 47 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x5C, 0x02, 0x5C, 0x02, 0xDC, 0x03, // Code for char G 48 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFC, 0x03, // Code for char H 49 | 0x03, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I 50 | 0x07, 0x80, 0x03, 0x80, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, // Code for char J 51 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x04, 0x02, // Code for char K 52 | 0x07, 0xFC, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, // Code for char L 53 | 0x07, 0xFC, 0x03, 0x04, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, // Code for char M 54 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, // Code for char N 55 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x1C, 0x02, 0x1C, 0x02, 0xFC, 0x03, // Code for char O 56 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x1C, 0x00, // Code for char P 57 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x84, 0x07, 0x84, 0x07, 0x84, 0x07, 0xFC, 0x03, // Code for char Q 58 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0xF0, 0x03, // Code for char R 59 | 0x07, 0x9C, 0x03, 0x94, 0x03, 0x94, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xF4, 0x03, // Code for char S 60 | 0x07, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x04, 0x00, // Code for char T 61 | 0x07, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, 0xFC, 0x03, // Code for char U 62 | 0x07, 0x7C, 0x00, 0xFC, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x80, 0x01, 0x7C, 0x00, // Code for char V 63 | 0x07, 0xFC, 0x03, 0x80, 0x03, 0x80, 0x03, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, // Code for char W 64 | 0x07, 0x04, 0x02, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x04, 0x02, // Code for char X 65 | 0x07, 0x00, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0xF0, 0x03, 0x10, 0x00, 0x10, 0x00, 0x1C, 0x00, // Code for char Y 66 | 0x07, 0x1C, 0x02, 0x9C, 0x03, 0x9C, 0x03, 0x44, 0x02, 0x34, 0x02, 0x34, 0x02, 0x1C, 0x02, // Code for char Z 67 | 0x05, 0x00, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char [ 68 | 0x03, 0x3C, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash 69 | 0x05, 0x00, 0x00, 0x03, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, // Code for char ] 70 | 0x05, 0x00, 0x00, 0xFF, 0x03, 0x01, 0x02, 0x01, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, // Code for char ^ 71 | 0x07, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, // Code for char _ 72 | 0x05, 0x00, 0x00, 0xFF, 0x03, 0x01, 0x02, 0x01, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, // Code for char ` 73 | 0x07, 0xFC, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0xFC, 0x03, 0xFC, 0x03, // Code for char a 74 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x02, 0x1C, 0x02, 0x1C, 0x02, 0xF0, 0x03, // Code for char b 75 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, // Code for char c 76 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0xF8, 0x01, // Code for char d 77 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, // Code for char e 78 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, // Code for char f 79 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x5C, 0x02, 0x5C, 0x02, 0xDC, 0x03, // Code for char g 80 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFC, 0x03, // Code for char h 81 | 0x03, 0x00, 0x00, 0xFC, 0x03, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i 82 | 0x07, 0x80, 0x03, 0x80, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, // Code for char j 83 | 0x07, 0xFC, 0x03, 0xFC, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x04, 0x02, // Code for char k 84 | 0x07, 0xFC, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, // Code for char l 85 | 0x07, 0xFC, 0x03, 0x04, 0x00, 0x04, 0x00, 0x3C, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, // Code for char m 86 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, // Code for char n 87 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x1C, 0x02, 0x1C, 0x02, 0xFC, 0x03, // Code for char o 88 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x1C, 0x00, // Code for char p 89 | 0x07, 0xFC, 0x03, 0x04, 0x02, 0x04, 0x02, 0x84, 0x07, 0x84, 0x07, 0x84, 0x07, 0xFC, 0x03, // Code for char q 90 | 0x07, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x14, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0xF0, 0x03, // Code for char r 91 | 0x07, 0x9C, 0x03, 0x94, 0x03, 0x94, 0x03, 0x14, 0x02, 0x14, 0x02, 0x14, 0x02, 0xF4, 0x03, // Code for char s 92 | 0x07, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x03, 0xF4, 0x03, 0xF4, 0x03, 0x04, 0x00, // Code for char t 93 | 0x07, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, 0xFC, 0x03, // Code for char u 94 | 0x07, 0x7C, 0x00, 0xFC, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x80, 0x01, 0x7C, 0x00, // Code for char v 95 | 0x07, 0xFC, 0x03, 0x80, 0x03, 0x80, 0x03, 0xFC, 0x03, 0x00, 0x02, 0x00, 0x02, 0xFC, 0x03, // Code for char w 96 | 0x07, 0x04, 0x02, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x04, 0x02, // Code for char x 97 | 0x07, 0x00, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0xF0, 0x03, 0x10, 0x00, 0x10, 0x00, 0x1C, 0x00, // Code for char y 98 | 0x07, 0x1C, 0x02, 0x9C, 0x03, 0x9C, 0x03, 0x44, 0x02, 0x34, 0x02, 0x34, 0x02, 0x1C, 0x02, // Code for char z 99 | 0x07, 0x00, 0x00, 0x60, 0x00, 0xFF, 0x07, 0xFF, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, // Code for char { 100 | 0x02, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | 101 | 0x06, 0x00, 0x00, 0x03, 0x04, 0xFF, 0x07, 0xFF, 0x07, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, // Code for char } 102 | 0x05, 0x00, 0x00, 0xFF, 0x03, 0x01, 0x02, 0x01, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, // Code for char ~ 103 | 0x02, 0xF8, 0x01, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char  104 | 105 | 106 | -------------------------------------------------------------------------------- /fonts/Wendy7x8.c: -------------------------------------------------------------------------------- 1 | 2 | //WARNING: This Font Require X-GLCD Lib. 3 | // You can not use it with MikroE GLCD Lib. 4 | 5 | //Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 6 | //MikroElektronika 2011 7 | //http://www.mikroe.com 8 | 9 | //GLCD FontName : wendy7x8 10 | //Based on a font by Wendy - fricky@gmail.com 11 | //GLCD FontSize : 7 x 8 12 | 13 | const unsigned short wendy7x8[] = { 14 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 15 | 0x01, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! 16 | 0x03, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, // Code for char " 17 | 0x05, 0x60, 0x7C, 0x04, 0x64, 0x7C, 0x00, 0x00, // Code for char # 18 | 0x03, 0x5C, 0xFE, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char $ 19 | 0x04, 0x48, 0x20, 0x10, 0x48, 0x00, 0x00, 0x00, // Code for char % 20 | 0x03, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, // Code for char & 21 | 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' 22 | 0x02, 0x38, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( 23 | 0x02, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) 24 | 0x07, 0x08, 0x1C, 0x3C, 0x78, 0x3C, 0x1C, 0x08, // Code for char * 25 | 0x03, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, // Code for char + 26 | 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , 27 | 0x03, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // Code for char - 28 | 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . 29 | 0x03, 0x60, 0x10, 0x0C, 0x00, 0x00, 0x00, 0x00, // Code for char / 30 | 0x03, 0x7C, 0x44, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char 0 31 | 0x01, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 32 | 0x03, 0x74, 0x54, 0x5C, 0x00, 0x00, 0x00, 0x00, // Code for char 2 33 | 0x03, 0x54, 0x54, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char 3 34 | 0x03, 0x3C, 0x20, 0x78, 0x00, 0x00, 0x00, 0x00, // Code for char 4 35 | 0x03, 0x5C, 0x54, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char 5 36 | 0x03, 0x7C, 0x54, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char 6 37 | 0x03, 0x04, 0x04, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char 7 38 | 0x03, 0x7C, 0x54, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char 8 39 | 0x03, 0x5C, 0x54, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char 9 40 | 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : 41 | 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; 42 | 0x03, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x00, // Code for char < 43 | 0x02, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = 44 | 0x03, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, // Code for char > 45 | 0x03, 0x5A, 0x0A, 0x0E, 0x00, 0x00, 0x00, 0x00, // Code for char ? 46 | 0x05, 0x7E, 0x42, 0x5A, 0x52, 0x5E, 0x00, 0x00, // Code for char @ 47 | 0x03, 0x7C, 0x14, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char A 48 | 0x03, 0x7C, 0x54, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char B 49 | 0x03, 0x7C, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, // Code for char C 50 | 0x03, 0x7C, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, // Code for char D 51 | 0x03, 0x7C, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, // Code for char E 52 | 0x03, 0x7C, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char F 53 | 0x03, 0x7C, 0x44, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char G 54 | 0x03, 0x7C, 0x10, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char H 55 | 0x01, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I 56 | 0x03, 0x40, 0x40, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char J 57 | 0x03, 0x7C, 0x10, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char K 58 | 0x03, 0x7C, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, // Code for char L 59 | 0x05, 0x7C, 0x04, 0x38, 0x04, 0x7C, 0x00, 0x00, // Code for char M 60 | 0x03, 0x7C, 0x04, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char N 61 | 0x03, 0x7C, 0x44, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char O 62 | 0x03, 0x7C, 0x14, 0x1C, 0x00, 0x00, 0x00, 0x00, // Code for char P 63 | 0x03, 0x1C, 0x14, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char Q 64 | 0x03, 0x7C, 0x14, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char R 65 | 0x03, 0x5C, 0x54, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char S 66 | 0x03, 0x04, 0x7C, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char T 67 | 0x03, 0x7C, 0x40, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char U 68 | 0x03, 0x3C, 0x40, 0x3C, 0x00, 0x00, 0x00, 0x00, // Code for char V 69 | 0x05, 0x7C, 0x40, 0x30, 0x40, 0x7C, 0x00, 0x00, // Code for char W 70 | 0x03, 0x6C, 0x10, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char X 71 | 0x03, 0x5C, 0x50, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char Y 72 | 0x03, 0x64, 0x54, 0x4C, 0x00, 0x00, 0x00, 0x00, // Code for char Z 73 | 0x02, 0x7C, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ 74 | 0x03, 0x0C, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash 75 | 0x02, 0x44, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] 76 | 0x01, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ 77 | 0x03, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, // Code for char _ 78 | 0x01, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` 79 | 0x03, 0x7C, 0x14, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char a 80 | 0x03, 0x7C, 0x54, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char b 81 | 0x03, 0x7C, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, // Code for char c 82 | 0x03, 0x7C, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, // Code for char d 83 | 0x03, 0x7C, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, // Code for char e 84 | 0x03, 0x7C, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char f 85 | 0x03, 0x7C, 0x44, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char g 86 | 0x03, 0x7C, 0x10, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char h 87 | 0x01, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i 88 | 0x03, 0x40, 0x40, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char j 89 | 0x03, 0x7C, 0x10, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char k 90 | 0x03, 0x7C, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, // Code for char l 91 | 0x05, 0x7C, 0x04, 0x38, 0x04, 0x7C, 0x00, 0x00, // Code for char m 92 | 0x03, 0x7C, 0x04, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char n 93 | 0x03, 0x7C, 0x44, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char o 94 | 0x03, 0x7C, 0x14, 0x1C, 0x00, 0x00, 0x00, 0x00, // Code for char p 95 | 0x03, 0x1C, 0x14, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char q 96 | 0x03, 0x7C, 0x14, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char r 97 | 0x03, 0x5C, 0x54, 0x74, 0x00, 0x00, 0x00, 0x00, // Code for char s 98 | 0x03, 0x04, 0x7C, 0x04, 0x00, 0x00, 0x00, 0x00, // Code for char t 99 | 0x03, 0x7C, 0x40, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char u 100 | 0x03, 0x3C, 0x40, 0x3C, 0x00, 0x00, 0x00, 0x00, // Code for char v 101 | 0x05, 0x7C, 0x40, 0x30, 0x40, 0x7C, 0x00, 0x00, // Code for char w 102 | 0x03, 0x6C, 0x10, 0x6C, 0x00, 0x00, 0x00, 0x00, // Code for char x 103 | 0x03, 0x5C, 0x50, 0x7C, 0x00, 0x00, 0x00, 0x00, // Code for char y 104 | 0x03, 0x64, 0x54, 0x4C, 0x00, 0x00, 0x00, 0x00, // Code for char z 105 | 0x01, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { 106 | 0x01, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | 107 | 0x01, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } 108 | 0x04, 0x10, 0x08, 0x10, 0x08, 0x00, 0x00, 0x00, // Code for char ~ 109 | 0x03, 0x7E, 0x42, 0x7E, 0x00, 0x00, 0x00, 0x00 // Code for char  110 | }; 111 | 112 | -------------------------------------------------------------------------------- /images/Arkanoid_Border128x118.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Arkanoid_Border128x118.raw -------------------------------------------------------------------------------- /images/Ball7x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Ball7x7.raw -------------------------------------------------------------------------------- /images/Brick_Blue13x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Brick_Blue13x7.raw -------------------------------------------------------------------------------- /images/Brick_Green13x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Brick_Green13x7.raw -------------------------------------------------------------------------------- /images/Brick_Pink13x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Brick_Pink13x7.raw -------------------------------------------------------------------------------- /images/Brick_Red13x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Brick_Red13x7.raw -------------------------------------------------------------------------------- /images/Brick_Yellow13x7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Brick_Yellow13x7.raw -------------------------------------------------------------------------------- /images/Mario13x96.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Mario13x96.raw -------------------------------------------------------------------------------- /images/MicroPython128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/MicroPython128x128.raw -------------------------------------------------------------------------------- /images/MicroPythonW128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/MicroPythonW128x128.raw -------------------------------------------------------------------------------- /images/Ostrich65x512.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Ostrich65x512.raw -------------------------------------------------------------------------------- /images/Ostrich65x64.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Ostrich65x64.raw -------------------------------------------------------------------------------- /images/Paddle12x4.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Paddle12x4.raw -------------------------------------------------------------------------------- /images/Paddle25x8.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Paddle25x8.raw -------------------------------------------------------------------------------- /images/Pi16x16.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Pi16x16.raw -------------------------------------------------------------------------------- /images/Python41x49.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Python41x49.raw -------------------------------------------------------------------------------- /images/Rainbow_48x26.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Rainbow_48x26.raw -------------------------------------------------------------------------------- /images/RaspberryPiWB128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/RaspberryPiWB128x128.raw -------------------------------------------------------------------------------- /images/Rototron128x26.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Rototron128x26.raw -------------------------------------------------------------------------------- /images/Tabby128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Tabby128x128.raw -------------------------------------------------------------------------------- /images/Tortie128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/Tortie128x128.raw -------------------------------------------------------------------------------- /images/XP_background128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/XP_background128x128.raw -------------------------------------------------------------------------------- /images/blinka45x48.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/blinka45x48.raw -------------------------------------------------------------------------------- /images/invaders48x36.pbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdagger/micropython-ssd1351/9134efff576df7c09dcb853742b94b53ea9a983b/images/invaders48x36.pbm -------------------------------------------------------------------------------- /levels/Level001.bin: -------------------------------------------------------------------------------- 1 | (4@LXd!!(!4!@!L!X!d!''('4'@'L'X'd'--(-4-@-L-X-d-33(343@3L3X3d3 -------------------------------------------------------------------------------- /levels/Level002.bin: -------------------------------------------------------------------------------- 1 | !'-39?E!'-39?((!('(-(3(944!4'4-43@@!@'@-LL!L'XX!d -------------------------------------------------------------------------------- /levels/Level003.bin: -------------------------------------------------------------------------------- 1 | ,F!,!9!F!S!,'9'F'-,-F-S-393S39,9F9S9,?9?F?9E -------------------------------------------------------------------------------- /levels/Level004.bin: -------------------------------------------------------------------------------- 1 | n!!a!n!'' 'T'a'n'-- ---G-T-a-n-33(343@3L3X3d3 -------------------------------------------------------------------------------- /levels/Level005.bin: -------------------------------------------------------------------------------- 1 | !'-3!'-344!4'4-43@@!@'@-@3aa!a'a-a3nn!n'n-n3 -------------------------------------------------------------------------------- /levels/Level006.bin: -------------------------------------------------------------------------------- 1 | ??X?d?!!4!@!X!d!9(949@9L9d9(4@LX33(343@3L3X3d3--(-4-@-L-X-d-E(E4E@ELEXE''4'@'X'd' -------------------------------------------------------------------------------- /levels/Level007.bin: -------------------------------------------------------------------------------- 1 | ")07>")07>  " ) 0 7 >--"-)-0-7->::":):0:7:>GG"G)G0G7G>TT"T)T0T7T>aa"a)a0a7a>nn"n)n0n7n> -------------------------------------------------------------------------------- /levels/Level008.bin: -------------------------------------------------------------------------------- 1 | ")07>EL  " ) 0 7 > E L::":):0:7:>:E:LTT"T)T0T7T>TETLnn"n)n0n7n>nEnL -------------------------------------------------------------------------------- /levels/Level009.bin: -------------------------------------------------------------------------------- 1 |  Ta-"G" )-):)G)T) 0-0:0G0T07 7-7:7G7T7a7>> >->:>G>T>a>n>E ETEnEL-LGLnL -------------------------------------------------------------------------------- /utils/generate_levels.py: -------------------------------------------------------------------------------- 1 | """Arkanoid code used to generate level binary files. 2 | 3 | Notes: 4 | The binary level files are comprised of 3 bytes (X, Y and color) 5 | for each brick. 6 | XY coordinates indicate the top left corner of the brick. 7 | Bricks are 13 pixels wide by 7 high. 8 | Common X values: 9 | 6, 19, 32, 45, 58, 71, 84, 97, 110 (9 columns across) 10 | 16, 28, 40, 52, 64, 76, 88, 100 (8 columns across) 11 | Common Y values: 12 | 27, 34, 41, 48, 55, 62, 69, 76 (8 rows is the maximum) 13 | Color byte (0: Red, 1: Yellow, 2: Blue, 3: Pink, 4: Green) 14 | """ 15 | 16 | 17 | def generate_level01(): 18 | """Generate the bricks.""" 19 | bricks = bytearray(120) 20 | index = 0 21 | for row in range(27, 57, 6): 22 | brick_color = (row - 27) // 6 23 | for col in range(16, 112, 12): 24 | bricks[index] = col 25 | bricks[index + 1] = row 26 | bricks[index + 2] = brick_color 27 | print('index: {0} = {1},{2} -> {3}'.format(index, 28 | bricks[index], 29 | bricks[index + 1], 30 | bricks[index + 2])) 31 | index += 3 32 | return bricks 33 | 34 | 35 | def generate_level02(): 36 | """Generate the bricks.""" 37 | bricks = bytearray(108) 38 | index = 0 39 | col_x = 0 40 | column_counts = [8, 7, 6, 5, 4, 3, 2, 1] 41 | brick_colors = [2, 4, 1, 3, 0, 1, 4, 2] 42 | for col in range(16, 112, 12): 43 | row_y = 0 44 | for row in range(27, 75, 6): 45 | if row_y >= column_counts[col_x]: 46 | break 47 | brick_color = brick_colors[col_x] 48 | bricks[index] = col 49 | bricks[index + 1] = row 50 | bricks[index + 2] = brick_color 51 | print('index: {0} = {1},{2} -> {3}'.format(index, 52 | bricks[index], 53 | bricks[index + 1], 54 | bricks[index + 2])) 55 | index += 3 56 | row_y += 1 57 | col_x += 1 58 | return bricks 59 | 60 | 61 | def generate_level03(): 62 | """Generate the bricks.""" 63 | pi = [ 64 | [44, 27, 4], 65 | [70, 27, 4], 66 | [31, 33, 4], 67 | [44, 33, 4], 68 | [57, 33, 0], 69 | [70, 33, 4], 70 | [83, 33, 4], 71 | [44, 39, 0], 72 | [57, 39, 0], 73 | [70, 39, 0], 74 | [31, 45, 0], 75 | [44, 45, 0], 76 | [70, 45, 0], 77 | [83, 45, 0], 78 | [31, 51, 0], 79 | [57, 51, 0], 80 | [83, 51, 0], 81 | [31, 57, 0], 82 | [44, 57, 0], 83 | [70, 57, 0], 84 | [83, 57, 0], 85 | [44, 63, 0], 86 | [57, 63, 0], 87 | [70, 63, 0], 88 | [57, 69, 0], 89 | ] 90 | bricks = bytearray(len(pi) * 3) 91 | index = 0 92 | for row in pi: 93 | bricks[index] = row[0] 94 | bricks[index + 1] = row[1] 95 | bricks[index + 2] = row[2] 96 | index += 3 97 | return bricks 98 | 99 | 100 | def generate_level04(): 101 | """Generate the bricks.""" 102 | pi = [ 103 | [6, 27, 1], 104 | [110, 27, 1], 105 | [6, 33, 2], 106 | [19, 33, 2], 107 | [97, 33, 2], 108 | [110, 33, 2], 109 | [6, 39, 3], 110 | [19, 39, 3], 111 | [32, 39, 3], 112 | [84, 39, 3], 113 | [97, 39, 3], 114 | [110, 39, 3], 115 | [6, 45, 4], 116 | [19, 45, 4], 117 | [32, 45, 4], 118 | [45, 45, 4], 119 | [71, 45, 4], 120 | [84, 45, 4], 121 | [97, 45, 4], 122 | [110, 45, 4], 123 | [16, 51, 0], 124 | [28, 51, 0], 125 | [40, 51, 0], 126 | [52, 51, 0], 127 | [64, 51, 0], 128 | [76, 51, 0], 129 | [88, 51, 0], 130 | [100, 51, 0], 131 | ] 132 | bricks = bytearray(len(pi) * 3) 133 | index = 0 134 | for row in pi: 135 | bricks[index] = row[0] 136 | bricks[index + 1] = row[1] 137 | bricks[index + 2] = row[2] 138 | index += 3 139 | return bricks 140 | 141 | 142 | def generate_level05(): 143 | """Generate the bricks.""" 144 | rgb = [ 145 | [6, 27, 0], 146 | [6, 33, 0], 147 | [6, 39, 0], 148 | [6, 45, 0], 149 | [6, 51, 0], 150 | [19, 27, 0], 151 | [19, 33, 0], 152 | [19, 39, 0], 153 | [19, 45, 0], 154 | [19, 51, 0], 155 | [52, 27, 4], 156 | [52, 33, 4], 157 | [52, 39, 4], 158 | [52, 45, 4], 159 | [52, 51, 4], 160 | [64, 27, 4], 161 | [64, 33, 4], 162 | [64, 39, 4], 163 | [64, 45, 4], 164 | [64, 51, 4], 165 | [97, 27, 2], 166 | [97, 33, 2], 167 | [97, 39, 2], 168 | [97, 45, 2], 169 | [97, 51, 2], 170 | [110, 27, 2], 171 | [110, 33, 2], 172 | [110, 39, 2], 173 | [110, 45, 2], 174 | [110, 51, 2], 175 | ] 176 | bricks = bytearray(len(rgb) * 3) 177 | index = 0 178 | for row in rgb: 179 | bricks[index] = row[0] 180 | bricks[index + 1] = row[1] 181 | bricks[index + 2] = row[2] 182 | index += 3 183 | return bricks 184 | 185 | 186 | def generate_level06(): 187 | """Generate the bricks.""" 188 | face = { 189 | 27: (28, 40, 52, 64, 76, 88), 190 | 33: (16, 28, 52, 64, 88, 100), 191 | 39: (16, 28, 52, 64, 88, 100), 192 | 45: (16, 28, 40, 52, 64, 76, 88, 100), 193 | 51: (16, 28, 40, 52, 64, 76, 88, 100), 194 | 57: (16, 40, 52, 64, 76, 100), 195 | 63: (16, 28, 88, 100), 196 | 69: (28, 40, 52, 64, 76, 88)} 197 | 198 | bricks = bytearray(sum([len(v) for v in face.values()]) * 3) 199 | index = 0 200 | for k, v in face.items(): 201 | for x in v: 202 | bricks[index] = x 203 | bricks[index + 1] = k 204 | bricks[index + 2] = 1 205 | index += 3 206 | return bricks 207 | 208 | 209 | def generate_level07(): 210 | """Generate the bricks.""" 211 | bricks = bytearray(9 * 6 * 3) 212 | color = 0 213 | index = 0 214 | for x in range(6, 111, 13): 215 | for y in range(27, 63, 7): 216 | bricks[index] = x 217 | bricks[index + 1] = y 218 | bricks[index + 2] = color 219 | index += 3 220 | color += 1 221 | if color >= 5: 222 | color = 0 223 | return bricks 224 | 225 | 226 | def generate_level08(): 227 | """Generate the bricks.""" 228 | bricks = bytearray(8 * 5 * 3) 229 | colors = [2, 0, 1, 3, 4] 230 | index = 0 231 | col_x = 0 232 | for x in range(6, 111, 26): 233 | for y in range(27, 77, 7): 234 | bricks[index] = x 235 | bricks[index + 1] = y 236 | bricks[index + 2] = colors[col_x] 237 | index += 3 238 | col_x += 1 239 | return bricks 240 | 241 | 242 | def generate_level09(): 243 | """Generate the bricks.""" 244 | pi = [ 245 | [19, 27, 1], 246 | [32, 27, 1], 247 | [84, 27, 1], 248 | [97, 27, 1], 249 | [45, 34, 1], 250 | [71, 34, 1], 251 | [32, 41, 4], 252 | [45, 41, 4], 253 | [58, 41, 4], 254 | [71, 41, 4], 255 | [84, 41, 4], 256 | [32, 48, 4], 257 | [45, 48, 0], 258 | [58, 48, 4], 259 | [71, 48, 0], 260 | [84, 48, 4], 261 | [19, 55, 4], 262 | [32, 55, 4], 263 | [45, 55, 4], 264 | [58, 55, 4], 265 | [71, 55, 4], 266 | [84, 55, 4], 267 | [97, 55, 4], 268 | [6, 62, 4], 269 | [19, 62, 4], 270 | [32, 62, 4], 271 | [45, 62, 4], 272 | [58, 62, 4], 273 | [71, 62, 4], 274 | [84, 62, 4], 275 | [97, 62, 4], 276 | [110, 62, 4], 277 | [6, 69, 4], 278 | [32, 69, 4], 279 | [84, 69, 4], 280 | [110, 69, 4], 281 | [6, 76, 4], 282 | [45, 76, 4], 283 | [71, 76, 4], 284 | [110, 76, 4], 285 | ] 286 | bricks = bytearray(len(pi) * 3) 287 | index = 0 288 | for row in pi: 289 | bricks[index] = row[0] 290 | bricks[index + 1] = row[1] 291 | bricks[index + 2] = row[2] 292 | index += 3 293 | return bricks 294 | 295 | 296 | def test(): 297 | """Test.""" 298 | ba = generate_level09() 299 | path = 'Level009.bin' 300 | with open(path, "w") as f: 301 | f.write(ba) 302 | 303 | 304 | test() 305 | -------------------------------------------------------------------------------- /utils/img2rgb565.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Utility to convert images to raw RGB565 format.""" 3 | 4 | from PIL import Image 5 | from struct import pack 6 | from os import path 7 | import sys 8 | 9 | 10 | def error(msg): 11 | """Display error and exit.""" 12 | print (msg) 13 | sys.exit(-1) 14 | 15 | 16 | def write_bin(f, pixel_list): 17 | """Save image in RGB565 format.""" 18 | for pix in pixel_list: 19 | r = (pix[0] >> 3) & 0x1F 20 | g = (pix[1] >> 2) & 0x3F 21 | b = (pix[2] >> 3) & 0x1F 22 | f.write(pack('>H', (r << 11) + (g << 5) + b)) 23 | 24 | 25 | if __name__ == '__main__': 26 | args = sys.argv 27 | if len(args) != 2: 28 | error('Please specify input file: ./img2rgb565.py test.png') 29 | in_path = args[1] 30 | if not path.exists(in_path): 31 | error('File Not Found: ' + in_path) 32 | 33 | filename, ext = path.splitext(in_path) 34 | out_path = filename + '.raw' 35 | img = Image.open(in_path).convert('RGB') 36 | pixels = list(img.getdata()) 37 | with open(out_path, 'wb') as f: 38 | write_bin(f, pixels) 39 | print('Saved: ' + out_path) 40 | -------------------------------------------------------------------------------- /xglcd_font.py: -------------------------------------------------------------------------------- 1 | """XGLCD Font Utility.""" 2 | from math import floor 3 | 4 | 5 | class XglcdFont(object): 6 | """Font data in X-GLCD format. 7 | 8 | Attributes: 9 | letters: A bytearray of letters (columns consist of bytes) 10 | width: Maximum pixel width of font 11 | height: Pixel height of font 12 | start_letter: ASCII number of first letter 13 | height_bytes: How many bytes comprises letter height 14 | 15 | Note: 16 | Font files can be generated with the free version of MikroElektronika 17 | GLCD Font Creator: www.mikroe.com/glcd-font-creator 18 | The font file must be in X-GLCD 'C' format. 19 | To save text files from this font creator program in Win7 or higher 20 | you must use XP compatibility mode or you can just use the clipboard. 21 | """ 22 | 23 | # Dict to translate bitwise values to byte position 24 | BIT_POS = {1: 0, 2: 2, 4: 4, 8: 6, 16: 8, 32: 10, 64: 12, 128: 14, 256: 16} 25 | # Dict to translate bitwise values to byte position (for transparent) 26 | BIT_POS_T = {1: 0, 2: 1, 4: 2, 8: 3, 16: 4, 32: 5, 64: 6, 128: 7, 256: 8} 27 | 28 | def __init__(self, path, width, height, start_letter=32, letter_count=96): 29 | """Constructor for X-GLCD Font object. 30 | 31 | Args: 32 | path (string): Full path of font file 33 | width (int): Maximum width in pixels of each letter 34 | height (int): Height in pixels of each letter 35 | start_letter (int): First ACII letter. Default is 32. 36 | letter_count (int): Total number of letters. Default is 96. 37 | """ 38 | self.width = width 39 | self.height = height 40 | self.start_letter = start_letter 41 | self.letter_count = letter_count 42 | self.bytes_per_letter = (floor( 43 | (self.height - 1) / 8) + 1) * self.width + 1 44 | self.__load_xglcd_font(path) 45 | 46 | def __load_xglcd_font(self, path): 47 | """Load X-GLCD font data from text file. 48 | 49 | Args: 50 | path (string): Full path of font file. 51 | """ 52 | bytes_per_letter = self.bytes_per_letter 53 | # Buffer to hold letter byte values 54 | self.letters = bytearray(bytes_per_letter * self.letter_count) 55 | mv = memoryview(self.letters) 56 | offset = 0 57 | with open(path, 'r') as f: 58 | for line in f: 59 | # Skip lines that do not start with hex values 60 | line = line.strip() 61 | if len(line) == 0 or line[0:2] != '0x': 62 | continue 63 | # Remove comments 64 | comment = line.find('//') 65 | if comment != -1: 66 | line = line[0:comment].strip() 67 | # Remove trailing commas 68 | if line.endswith(','): 69 | line = line[0:len(line) - 1] 70 | # Convert hex strings to bytearray and insert in to letters 71 | mv[offset: offset + bytes_per_letter] = bytearray( 72 | int(b, 16) for b in line.split(',')) 73 | offset += bytes_per_letter 74 | 75 | def lit_bits(self, n): 76 | """Return positions of 1 bits only.""" 77 | while n: 78 | b = n & (~n+1) 79 | yield self.BIT_POS[b] 80 | n ^= b 81 | 82 | def lit_bits_t(self, n): 83 | """Return positions of 1 bits only (transparent).""" 84 | while n: 85 | b = n & (~n+1) 86 | yield self.BIT_POS_T[b] 87 | n ^= b 88 | 89 | def get_width_height(self, letter): 90 | """Return width and height of letter.""" 91 | # Get index of letter 92 | letter_ord = ord(letter) - self.start_letter 93 | # Confirm font contains letter 94 | if letter_ord >= self.letter_count: 95 | print('Font does not contain character: ' + letter) 96 | return 0, 0 97 | bytes_per_letter = self.bytes_per_letter 98 | offset = letter_ord * bytes_per_letter 99 | return self.letters[offset], self.height 100 | 101 | def get_letter(self, letter, color, background=0, landscape=False): 102 | """Convert letter byte data to pixels. 103 | 104 | Args: 105 | letter (string): Letter to return (must exist within font). 106 | color (int): RGB565 color value. 107 | background (int): RGB565 background color (default: black). 108 | landscape (bool): Orientation (default: False = portrait) 109 | Returns: 110 | (bytearray): Pixel data. 111 | (int, int): Letter width and height. 112 | """ 113 | # Get index of letter 114 | letter_ord = ord(letter) - self.start_letter 115 | # Confirm font contains letter 116 | if letter_ord >= self.letter_count: 117 | print('Font does not contain character: ' + letter) 118 | return b'', 0, 0 119 | bytes_per_letter = self.bytes_per_letter 120 | offset = letter_ord * bytes_per_letter 121 | mv = memoryview(self.letters[offset:offset + bytes_per_letter]) 122 | 123 | # Get width of letter (specified by first byte) 124 | letter_width = mv[0] 125 | letter_height = self.height 126 | # Get size in bytes of specified letter 127 | letter_size = letter_height * letter_width 128 | # Create buffer (double size to accommodate 16 bit colors) 129 | if background: 130 | buf = bytearray(background.to_bytes(2, 'big') * letter_size) 131 | else: 132 | buf = bytearray(letter_size * 2) 133 | 134 | msb, lsb = color.to_bytes(2, 'big') 135 | 136 | column_size = letter_height * 2 137 | if landscape: 138 | # Populate starting at end of each column 139 | pos = column_size - 1 140 | else: 141 | # Populate buffer in order for portrait 142 | pos = 0 143 | lh = letter_height 144 | start_pos = pos 145 | # Loop through letter byte data and convert to pixel data 146 | for b in mv[1:]: 147 | # Process only colored bits 148 | for bit in self.lit_bits(b): 149 | if landscape: 150 | # print("lh: {}, pos: {}, bit: {}".format(lh, pos, bit)) 151 | buf[pos - (bit + 1)] = msb 152 | buf[pos - bit] = lsb 153 | else: 154 | # print("lh: {}, pos: {}, bit: {}".format(lh, pos, bit)) 155 | buf[bit + pos] = msb 156 | buf[bit + pos + 1] = lsb 157 | if lh > 8: 158 | if landscape: 159 | # Decrement position by double byte 160 | pos -= 16 161 | else: 162 | # Increment position by double byte 163 | pos += 16 164 | lh -= 8 165 | else: 166 | if landscape: 167 | # Move position to end of next row 168 | pos = start_pos + column_size 169 | start_pos = pos 170 | else: 171 | # Increase position by remaing letter height to next column 172 | pos += lh * 2 173 | lh = letter_height 174 | return buf, letter_width, letter_height 175 | 176 | def get_letter_trans(self, letter, landscape=False): 177 | """Convert letter byte data to X,Y pixels for transparent drawing. 178 | 179 | Args: 180 | letter (string): Letter to return (must exist within font). 181 | landscape (bool): Orientation (default: False = portrait) 182 | Yields: 183 | (int, int): X,Y relative position of bits to draw 184 | """ 185 | # Get index of letter 186 | letter_ord = ord(letter) - self.start_letter 187 | # Confirm font contains letter 188 | if letter_ord >= self.letter_count: 189 | print('Font does not contain character: ' + letter) 190 | return b'', 0, 0 191 | bytes_per_letter = self.bytes_per_letter 192 | offset = letter_ord * bytes_per_letter 193 | mv = memoryview(self.letters[offset:offset + bytes_per_letter]) 194 | 195 | # Get width of letter (specified by first byte) 196 | letter_height = self.height 197 | x = 0 198 | 199 | # Determine number of bytes per letter Y column 200 | byte_height = int(letter_height / 8) + (letter_height % 8 > 0) 201 | bh = 0 202 | # Loop through letter byte data and convert to pixel data 203 | for b in mv[1:]: 204 | # Process only colored bits 205 | for bit in self.lit_bits_t(b): 206 | if landscape: 207 | yield letter_height - ((bh << 3) + bit), x 208 | else: 209 | yield x, (bh << 3) + bit 210 | if bh < byte_height - 1: 211 | # Next column byte 212 | bh += 1 213 | else: 214 | # Next column 215 | x += 1 216 | bh = 0 217 | 218 | def measure_text(self, text, spacing=1): 219 | """Measure length of text string in pixels. 220 | 221 | Args: 222 | text (string): Text string to measure 223 | spacing (optional int): Pixel spacing between letters. Default: 1. 224 | Returns: 225 | int: length of text 226 | """ 227 | length = 0 228 | for letter in text: 229 | # Get index of letter 230 | letter_ord = ord(letter) - self.start_letter 231 | offset = letter_ord * self.bytes_per_letter 232 | # Add length of letter and spacing 233 | length += self.letters[offset] + spacing 234 | return length 235 | --------------------------------------------------------------------------------