Now that I have the e-paper display working, I thought it would be fun to create a nametag. One of the great features of e-paper is that once programmed, the display remains after the power is removed making it very suitable for such a purpose.
I started off creating a 250 x 122 pixel image in Canva and downloading it as a PNG image file.

The next step was to convert it to a bitmap image that could be displayed on the e-paper display. I used https://javl.github.io/image2cpp/
This generates a bitmap table you paste into the sketch.
Here’s the sketch…
/*
* Amateur Radio Callsign Badge Display
* Using EPD128x250 Library with Bitmap Image
*
* Displays VE3AKK/VE3LFO callsign badge from bitmap data
*/
/*
* Amateur Radio Callsign Badge Display
* Using EPD128x250 Library with Bitmap Image
*
* Displays VE3AKK/VE3LFO callsign badge from bitmap data
*/
#include "EPD128x250.h"
// Pin definitions - ESP32-C3 SuperMini
#define RST_PIN 2
#define DC_PIN 3
#define CS_PIN 7
#define BUSY_PIN 1
#define MOSI_PIN 10
#define CLK_PIN 8
// Create EPD object
EPD128x250 epd(RST_PIN, DC_PIN, CS_PIN, BUSY_PIN, MOSI_PIN, CLK_PIN);
// Badge dimensions
#define BADGE_WIDTH 250
#define BADGE_HEIGHT 122
// Badge bitmap - VE3AKK/VE3LFO callsign with "Dave"
const unsigned char badge_bitmap[] PROGMEM = {
// 'VE3AKKVE3LFO-2, 250x122px
0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x40,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xfe, 0x3f, 0xe1, 0xc0, 0x03, 0xc0, 0x7f, 0xf0, 0x7f, 0x87, 0xe1, 0xc3, 0xf1, 0xfe,
0x30, 0xff, 0x8e, 0x00, 0x1f, 0x01, 0xfc, 0x7f, 0xf0, 0x00, 0xfc, 0x03, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xfe, 0x1f, 0xe3, 0xc0, 0x03, 0x80, 0x1f, 0xf0, 0x7f, 0x87, 0xc3, 0xc3, 0xe1, 0xfe,
0x38, 0xff, 0x0e, 0x00, 0x1e, 0x00, 0xfc, 0x7f, 0xf0, 0x00, 0xf8, 0x01, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xfe, 0x1f, 0xc3, 0xc0, 0x03, 0x00, 0x1f, 0xe0, 0x3f, 0x87, 0x87, 0xc3, 0xc3, 0xfe,
0x38, 0x7f, 0x0e, 0x00, 0x1c, 0x00, 0x7c, 0x7f, 0xf0, 0x00, 0xf0, 0x00, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x1f, 0xc3, 0xc7, 0xff, 0x9f, 0x0f, 0xe0, 0x3f, 0x87, 0x8f, 0xc3, 0x87, 0xfc,
0x78, 0x7f, 0x1e, 0x1f, 0xfc, 0x78, 0x7c, 0x7f, 0xf0, 0xff, 0xe0, 0xf8, 0x7f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x0f, 0xc7, 0xc7, 0xff, 0xff, 0x0f, 0xe2, 0x3f, 0x87, 0x0f, 0xc3, 0x0f, 0xfc,
0x7c, 0x7f, 0x1e, 0x1f, 0xfe, 0xfc, 0x7c, 0x7f, 0xf0, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x0f, 0x87, 0xc7, 0xff, 0xff, 0x0f, 0xc2, 0x1f, 0x86, 0x1f, 0xc3, 0x1f, 0xfc,
0x7c, 0x3e, 0x1e, 0x1f, 0xff, 0xfc, 0x7c, 0x7f, 0xf0, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x8f, 0x87, 0xc7, 0xff, 0xff, 0x1f, 0xc6, 0x1f, 0x84, 0x3f, 0xc2, 0x1f, 0xf8,
0x7c, 0x3e, 0x3e, 0x1f, 0xff, 0xf8, 0x7c, 0x7f, 0xf0, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x87, 0x8f, 0xc0, 0x0f, 0xe0, 0x3f, 0xc7, 0x1f, 0x80, 0x7f, 0xc0, 0x3f, 0xf8,
0xfe, 0x3e, 0x3e, 0x00, 0x3f, 0x80, 0xfc, 0x7f, 0xf0, 0xff, 0xc7, 0xfe, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0x87, 0x0f, 0xc0, 0x0f, 0xe0, 0x3f, 0x87, 0x0f, 0x80, 0x7f, 0xc0, 0x7f, 0xf8,
0xfe, 0x1c, 0x3e, 0x00, 0x3f, 0x81, 0xfc, 0x7f, 0xf0, 0x01, 0xc7, 0xfe, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xc7, 0x0f, 0xc0, 0x0f, 0xe0, 0x1f, 0x8f, 0x0f, 0x80, 0x7f, 0xc0, 0x3f, 0xf0,
0xfe, 0x1c, 0x7e, 0x00, 0x3f, 0x80, 0x7c, 0x7f, 0xf0, 0x01, 0xc7, 0xfe, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xc3, 0x1f, 0xc7, 0xff, 0xff, 0x0f, 0x0f, 0x8f, 0x84, 0x3f, 0xc0, 0x1f, 0xf1,
0xff, 0x1c, 0x7e, 0x1f, 0xff, 0xfc, 0x3c, 0x7f, 0xf0, 0x01, 0xc7, 0xfe, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xc3, 0x1f, 0xc7, 0xff, 0xff, 0x8f, 0x00, 0x07, 0x84, 0x1f, 0xc2, 0x1f, 0xf1,
0xff, 0x08, 0x7e, 0x1f, 0xff, 0xfc, 0x3c, 0x7f, 0xf0, 0xff, 0xc3, 0xfe, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xe2, 0x1f, 0xc7, 0xff, 0xff, 0x8f, 0x00, 0x07, 0x86, 0x0f, 0xc3, 0x0f, 0xe1,
0xff, 0x08, 0xfe, 0x1f, 0xfe, 0xfe, 0x3c, 0x7f, 0xf0, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xe0, 0x3f, 0xc7, 0xff, 0x1f, 0x8e, 0x00, 0x07, 0x87, 0x0f, 0xc3, 0x87, 0xe3,
0xff, 0x80, 0xfe, 0x1f, 0xf8, 0xfc, 0x3c, 0x7f, 0xf0, 0xff, 0xc3, 0xfc, 0x3f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xe0, 0x3f, 0xc7, 0xff, 0x0f, 0x0e, 0x1f, 0xc3, 0x87, 0x87, 0xc3, 0xc3, 0xe3,
0xff, 0x80, 0xfe, 0x1f, 0xf8, 0x7c, 0x3c, 0x7f, 0xf0, 0xff, 0xe0, 0xf8, 0x7f, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xf0, 0x3f, 0xc0, 0x03, 0x00, 0x0e, 0x3f, 0xc3, 0x87, 0xc3, 0xc3, 0xc1, 0xe3,
0xff, 0x81, 0xfe, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x70, 0xff, 0xf0, 0x00, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xf0, 0x7f, 0xc0, 0x03, 0x80, 0x1c, 0x3f, 0xe3, 0x87, 0xe1, 0xc3, 0xe1, 0xc7,
0xff, 0xc1, 0xfe, 0x00, 0x1e, 0x00, 0x7c, 0x00, 0x70, 0xff, 0xf8, 0x01, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xf0, 0x7f, 0xc0, 0x03, 0xc0, 0x3c, 0x3f, 0xe1, 0x87, 0xe0, 0xc3, 0xf0, 0xc7,
0xff, 0xc1, 0xfe, 0x00, 0x1f, 0x01, 0xfc, 0x00, 0x70, 0xff, 0xfc, 0x03, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7c, 0x0f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x07, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x87, 0xf0, 0x1f,
0x0f, 0xe1, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x83, 0xc0, 0x0f,
0x0f, 0xe1, 0xe0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0x80, 0x07,
0x87, 0xe3, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0xc7, 0x87,
0x87, 0xc3, 0x83, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0xff, 0xc7,
0x87, 0xc3, 0x87, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0xff, 0x87,
0xc3, 0x87, 0x87, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0xf8, 0x07,
0xc3, 0x87, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xc3, 0xc0, 0x07,
0xc3, 0x87, 0x80, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x83, 0x83, 0xc7,
0xe1, 0x0f, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x87, 0x87, 0xc7,
0xe1, 0x0f, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0x07, 0x87, 0x87,
0xf0, 0x1f, 0x87, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7c, 0x0f, 0x87, 0x87,
0xf0, 0x1f, 0x83, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x0f, 0x80, 0x01,
0xf0, 0x1f, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xc0, 0x41,
0xf8, 0x3f, 0xe0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xe0, 0xe1,
0xf8, 0x3f, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0xfe, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xc0,
0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00
};
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("\n=== Callsign Badge Display ===");
if (!epd.begin()) {
Serial.println("Failed to initialize EPD!");
while(1) delay(1000);
} else {
Serial.println("EPD initialized successfully!");
}
epd.setRotation(1);
// Draw test pattern first
Serial.println("Drawing test rectangles...");
epd.clearBuffer();
epd.drawRect(10, 10, 50, 50, true);
epd.fillRect(70, 10, 50, 50, true);
epd.display();
Serial.println("Test pattern displayed. Waiting 5 seconds...");
delay(5000);
// Now try the bitmap
Serial.println("Displaying bitmap...");
displayBitmap();
Serial.println("Badge displayed! Staying awake...");
// Comment out deep sleep for now so we can debug
// epd.sleep();
// esp_deep_sleep_start();
}
void loop() {
delay(1000); // Just idle
}
void displayBitmap() {
Serial.println("Drawing bitmap directly to buffer...");
uint8_t* displayBuffer = epd.getBuffer();
// Clear buffer to white first
memset(displayBuffer, 0xFF, 4000);
for (int bitmapY = 0; bitmapY < BADGE_HEIGHT; bitmapY++) {
for (int bitmapX = 0; bitmapX < BADGE_WIDTH; bitmapX++) {
// Read bit from bitmap
int bitmapByteIndex = bitmapY * 32 + (bitmapX / 8);
int bitmapBitIndex = 7 - (bitmapX % 8);
uint8_t bitmapByte = pgm_read_byte(&badge_bitmap[bitmapByteIndex]);
bool bitmapPixel = (bitmapByte & (1 << bitmapBitIndex)) != 0;
// Rotate: bitmap(x,y) -> display(y, 249-x)
int dispX = bitmapY;
int dispY = (BADGE_WIDTH - 1) - bitmapX;
if (dispX >= 0 && dispX < 128 && dispY >= 0 && dispY < 250) {
int dispByteIndex = dispY * 16 + (dispX / 8);
int dispBitIndex = 7 - (dispX % 8);
// NO inversion: bitmap black (0) -> display black (0)
if (!bitmapPixel) { // Changed from bitmapPixel to !bitmapPixel
displayBuffer[dispByteIndex] &= ~(1 << dispBitIndex); // Black
}
}
}
}
epd.display();
Serial.println("Done!");
}
This sketch was modified from the original e-paper sketch to us a library file to handle some of the work.
EPD128x250.cpp
/*
* EPD128x250 - E-Paper Display Library Implementation
* With Partial Refresh Support
*/
#include "EPD128x250.h"
// Full refresh LUT tables
const uint8_t EPD128x250::LUT_VCOM_FULL[] = {
0x01, 0x00, 0x14, 0x14, 0x01, 0x01, 0x00, 0x01,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_WW_FULL[] = {
0x01, 0x60, 0x14, 0x14, 0x01, 0x01, 0x00, 0x01,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_BW_FULL[] = {
0x01, 0x60, 0x14, 0x14, 0x01, 0x01, 0x00, 0x01,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_WB_FULL[] = {
0x01, 0x90, 0x14, 0x14, 0x01, 0x01, 0x00, 0x01,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_BB_FULL[] = {
0x01, 0x90, 0x14, 0x14, 0x01, 0x01, 0x00, 0x01,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// Partial refresh LUT tables (faster, no flicker)
const uint8_t EPD128x250::LUT_VCOM_PARTIAL[] = {
0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_WW_PARTIAL[] = {
0x10, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_BW_PARTIAL[] = {
0x10, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_WB_PARTIAL[] = {
0x80, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t EPD128x250::LUT_BB_PARTIAL[] = {
0x80, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
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, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
EPD128x250::EPD128x250(int8_t rst, int8_t dc, int8_t cs, int8_t busy,
int8_t mosi, int8_t clk)
: _rst(rst), _dc(dc), _cs(cs), _busy(busy),
_mosi(mosi), _clk(clk), _spi(nullptr), _spiOwned(false),
_orientation(PORTRAIT), _rotation(0),
_width(EPD_WIDTH), _height(EPD_HEIGHT),
_cursor_x(0), _cursor_y(0), _text_size(1), _line_spacing(2), _text_color(true) {
memset(_buffer, 0xFF, EPD_BUFFER_SIZE);
}
bool EPD128x250::begin(SPIClass *spiInstance) {
pinMode(_rst, OUTPUT);
pinMode(_dc, OUTPUT);
pinMode(_cs, OUTPUT);
pinMode(_busy, INPUT);
digitalWrite(_cs, HIGH);
digitalWrite(_dc, HIGH);
digitalWrite(_rst, HIGH);
if (spiInstance != nullptr) {
_spi = spiInstance;
_spiOwned = false;
} else {
#ifdef ESP32
_spi = new SPIClass(FSPI);
_spiOwned = true;
if (_mosi >= 0 && _clk >= 0) {
_spi->begin(_clk, -1, _mosi, _cs);
} else {
_spi->begin();
}
#else
_spi = &SPI;
_spiOwned = false;
_spi->begin();
#endif
}
delay(100);
initDisplay();
return true;
}
void EPD128x250::end() {
if (_spiOwned && _spi != nullptr) {
_spi->end();
delete _spi;
_spi = nullptr;
}
}
void EPD128x250::reset() {
digitalWrite(_rst, HIGH);
delay(20);
digitalWrite(_rst, LOW);
delay(5);
digitalWrite(_rst, HIGH);
delay(20);
}
void EPD128x250::initDisplay() {
reset();
_spi->beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
spiWrite(0x00, true); spiWrite(0xFF);
spiWrite(0x01, true); spiWrite(0x03); spiWrite(0x00); spiWrite(0x3F); spiWrite(0x3F); spiWrite(0x03);
spiWrite(0x03, true); spiWrite(0x00);
spiWrite(0x06, true); spiWrite(0x27); spiWrite(0x27); spiWrite(0x2F);
spiWrite(0x30, true); spiWrite(0x09);
spiWrite(0x60, true); spiWrite(0x22);
spiWrite(0x82, true); spiWrite(0x00);
spiWrite(0xE3, true); spiWrite(0x00);
spiWrite(0x41, true); spiWrite(0x00);
spiWrite(0x61, true); spiWrite(0x80); spiWrite(0x00); spiWrite(0xFA);
spiWrite(0x65, true); spiWrite(0x00); spiWrite(0x00); spiWrite(0x00);
spiWrite(0x50, true); spiWrite(0xB7);
}
void EPD128x250::spiWrite(uint8_t data, bool isCommand) {
digitalWrite(_dc, isCommand ? LOW : HIGH);
digitalWrite(_cs, LOW);
_spi->transfer(data);
digitalWrite(_cs, HIGH);
if (!isCommand) {
delayMicroseconds(1);
}
}
void EPD128x250::waitBusy(uint32_t timeout_ms) {
unsigned long start = millis();
while (digitalRead(_busy) == LOW) {
if (millis() - start > timeout_ms) {
return;
}
delay(10);
}
}
bool EPD128x250::isBusy() {
return digitalRead(_busy) == LOW;
}
void EPD128x250::loadFullRefreshLUT() {
spiWrite(0x20, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_VCOM_FULL[i]);
spiWrite(0x21, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_WW_FULL[i]);
spiWrite(0x22, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_BW_FULL[i]);
spiWrite(0x23, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_WB_FULL[i]);
spiWrite(0x24, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_BB_FULL[i]);
}
void EPD128x250::loadPartialRefreshLUT() {
spiWrite(0x20, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_VCOM_PARTIAL[i]);
spiWrite(0x21, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_WW_PARTIAL[i]);
spiWrite(0x22, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_BW_PARTIAL[i]);
spiWrite(0x23, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_WB_PARTIAL[i]);
spiWrite(0x24, true);
for (int i = 0; i < 56; i++) spiWrite(LUT_BB_PARTIAL[i]);
}
void EPD128x250::sendBuffer() {
spiWrite(0x13, true);
digitalWrite(_dc, HIGH);
digitalWrite(_cs, LOW);
_spi->transferBytes(_buffer, NULL, EPD_BUFFER_SIZE);
digitalWrite(_cs, HIGH);
}
void EPD128x250::sendPartialBuffer(int16_t x, int16_t y, int16_t w, int16_t h) {
// Set partial window
spiWrite(0x91, true); // Partial In
spiWrite(0x90, true); // Partial Window
spiWrite(x & 0xF8); // X start (must be multiple of 8)
spiWrite(((x + w - 1) | 0x07)); // X end
spiWrite(y >> 8); // Y start high
spiWrite(y & 0xFF); // Y start low
spiWrite((y + h - 1) >> 8); // Y end high
spiWrite((y + h - 1) & 0xFF); // Y end low
spiWrite(0x01); // Gates scan both inside and outside
// Send buffer data for the partial area
spiWrite(0x13, true);
digitalWrite(_dc, HIGH);
digitalWrite(_cs, LOW);
int startByte = y * 16 + (x / 8);
int bytesPerRow = (w + 7) / 8;
for (int row = 0; row < h; row++) {
int rowStart = (y + row) * 16 + (x / 8);
_spi->transferBytes(&_buffer[rowStart], NULL, bytesPerRow);
}
digitalWrite(_cs, HIGH);
}
void EPD128x250::refreshDisplay() {
spiWrite(0x17, true);
spiWrite(0xA5);
waitBusy();
}
void EPD128x250::refreshPartial() {
spiWrite(0x17, true);
spiWrite(0xA5);
waitBusy(5000); // Shorter timeout for partial refresh
spiWrite(0x92, true); // Partial Out
}
void EPD128x250::clearDisplay(bool white) {
spiWrite(0x50, true);
spiWrite(0xB7);
memset(_buffer, white ? 0xFF : 0x00, EPD_BUFFER_SIZE);
sendBuffer();
loadFullRefreshLUT();
refreshDisplay();
}
void EPD128x250::display(RefreshMode mode) {
spiWrite(0x50, true);
spiWrite(0xB7);
sendBuffer();
if (mode == FULL_REFRESH) {
loadFullRefreshLUT();
refreshDisplay();
} else {
loadPartialRefreshLUT();
refreshDisplay(); // Use same refresh command, LUT controls the behavior
}
}
void EPD128x250::displayPartial(int16_t x, int16_t y, int16_t w, int16_t h) {
spiWrite(0x50, true);
spiWrite(0xB7);
loadPartialRefreshLUT();
sendPartialBuffer(x, y, w, h);
refreshPartial();
}
void EPD128x250::sleep() {
spiWrite(0x10, true);
spiWrite(0x01);
}
void EPD128x250::setRotation(uint8_t rotation) {
_rotation = rotation % 4;
switch (_rotation) {
case 0:
case 2:
_width = EPD_WIDTH;
_height = EPD_HEIGHT;
_orientation = PORTRAIT;
break;
case 1:
case 3:
_width = EPD_HEIGHT;
_height = EPD_WIDTH;
_orientation = LANDSCAPE;
break;
}
}
int16_t EPD128x250::width() {
return _width;
}
int16_t EPD128x250::height() {
return _height;
}
void EPD128x250::fillScreen(bool black) {
memset(_buffer, black ? 0x00 : 0xFF, EPD_BUFFER_SIZE);
}
void EPD128x250::clearBuffer() {
memset(_buffer, 0xFF, EPD_BUFFER_SIZE);
}
void EPD128x250::drawPixel(int16_t x, int16_t y, bool black) {
int16_t temp;
switch (_rotation) {
case 0:
break;
case 1:
temp = x;
x = EPD_HEIGHT - 1 - y;
y = temp;
break;
case 2:
x = EPD_WIDTH - 1 - x;
y = EPD_HEIGHT - 1 - y;
break;
case 3:
temp = x;
x = y;
y = EPD_WIDTH - 1 - temp;
break;
}
if (x < 0 || x >= EPD_WIDTH || y < 0 || y >= EPD_HEIGHT) return;
int16_t byte_col = x / 8;
uint8_t bit_mask = 0x80 >> (x % 8);
int32_t idx = y * 16 + byte_col;
if (black) {
_buffer[idx] &= ~bit_mask;
} else {
_buffer[idx] |= bit_mask;
}
}
void EPD128x250::drawHLine(int16_t x, int16_t y, int16_t w, bool black) {
for (int16_t i = 0; i < w; i++) {
drawPixel(x + i, y, black);
}
}
void EPD128x250::drawVLine(int16_t x, int16_t y, int16_t h, bool black) {
for (int16_t i = 0; i < h; i++) {
drawPixel(x, y + i, black);
}
}
void EPD128x250::drawRect(int16_t x, int16_t y, int16_t w, int16_t h, bool black) {
drawHLine(x, y, w, black);
drawHLine(x, y + h - 1, w, black);
drawVLine(x, y, h, black);
drawVLine(x + w - 1, y, h, black);
}
void EPD128x250::fillRect(int16_t x, int16_t y, int16_t w, int16_t h, bool black) {
for (int16_t i = 0; i < h; i++) {
drawHLine(x, y + i, w, black);
}
}
const uint8_t PROGMEM font5x7[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62,
0x36, 0x49, 0x55, 0x22, 0x50, 0x00, 0x05, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00,
0x08, 0x2A, 0x1C, 0x2A, 0x08, 0x08, 0x08, 0x3E, 0x08, 0x08,
0x00, 0x50, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08,
0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00,
0x42, 0x61, 0x51, 0x49, 0x46, 0x21, 0x41, 0x45, 0x4B, 0x31,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39,
0x3C, 0x4A, 0x49, 0x49, 0x30, 0x01, 0x71, 0x09, 0x05, 0x03,
0x36, 0x49, 0x49, 0x49, 0x36, 0x06, 0x49, 0x49, 0x29, 0x1E,
0x00, 0x36, 0x36, 0x00, 0x00, 0x00, 0x56, 0x36, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14,
0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x51, 0x09, 0x06,
0x32, 0x49, 0x79, 0x41, 0x3E, 0x7E, 0x11, 0x11, 0x11, 0x7E,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22,
0x7F, 0x41, 0x41, 0x22, 0x1C, 0x7F, 0x49, 0x49, 0x49, 0x41,
0x7F, 0x09, 0x09, 0x01, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x32,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x04, 0x02, 0x7F,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x46, 0x49, 0x49, 0x49, 0x31,
0x01, 0x01, 0x7F, 0x01, 0x01, 0x3F, 0x40, 0x40, 0x40, 0x3F,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x7F, 0x20, 0x18, 0x20, 0x7F,
0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03,
0x61, 0x51, 0x49, 0x45, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41,
0x02, 0x04, 0x08, 0x10, 0x20, 0x41, 0x41, 0x7F, 0x00, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40,
0x00, 0x01, 0x02, 0x04, 0x00, 0x20, 0x54, 0x54, 0x54, 0x78,
0x7F, 0x48, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x20,
0x38, 0x44, 0x44, 0x48, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18,
0x08, 0x7E, 0x09, 0x01, 0x02, 0x08, 0x14, 0x54, 0x54, 0x3C,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00,
0x20, 0x40, 0x44, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38,
0x7C, 0x14, 0x14, 0x14, 0x08, 0x08, 0x14, 0x14, 0x18, 0x7C,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x20,
0x04, 0x3F, 0x44, 0x40, 0x20, 0x3C, 0x40, 0x40, 0x20, 0x7C,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C,
0x44, 0x28, 0x10, 0x28, 0x44, 0x0C, 0x50, 0x50, 0x50, 0x3C,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00,
0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00,
0x08, 0x04, 0x08, 0x10, 0x08
};
void EPD128x250::setTextSize(uint8_t size) {
_text_size = (size > 0) ? size : 1;
}
void EPD128x250::setCursor(int16_t x, int16_t y) {
_cursor_x = x;
_cursor_y = y;
}
void EPD128x250::setTextColor(bool black) {
_text_color = black;
}
void EPD128x250::setLineSpacing(uint8_t spacing) {
_line_spacing = spacing;
}
void EPD128x250::drawChar(int16_t x, int16_t y, unsigned char c, bool color, uint8_t size) {
if (c < 32 || c > 126) return;
c -= 32;
for (uint8_t col = 0; col < 5; col++) {
uint8_t line = pgm_read_byte(&font5x7[c * 5 + col]);
for (uint8_t row = 0; row < 8; row++) {
if (line & 0x01) {
if (size == 1) {
drawPixel(x + col, y + row, color);
} else {
fillRect(x + col * size, y + row * size, size, size, color);
}
}
line >>= 1;
}
}
}
void EPD128x250::print(const char* text) {
while (*text) {
if (*text == '\n') {
_cursor_y += (_text_size * 8) + _line_spacing;
_cursor_x = 0;
} else if (*text == '\r') {
_cursor_x = 0;
} else {
drawChar(_cursor_x, _cursor_y, *text, _text_color, _text_size);
_cursor_x += _text_size * 6;
if (_cursor_x > (_width - _text_size * 6)) {
_cursor_x = 0;
_cursor_y += (_text_size * 8) + _line_spacing;
}
}
text++;
}
}
void EPD128x250::print(const String& text) {
print(text.c_str());
}
void EPD128x250::println(const char* text) {
print(text);
_cursor_x = 0;
_cursor_y += (_text_size * 8) + _line_spacing;
}
void EPD128x250::println(const String& text) {
println(text.c_str());
}
EPD128x250.h
/*
* EPD128x250 - E-Paper Display Library
* For 128x250 pixel e-paper displays
* Now with partial refresh support!
*/
#ifndef EPD128X250_H
#define EPD128X250_H
#include <Arduino.h>
#include <SPI.h>
#define EPD_WIDTH 128
#define EPD_HEIGHT 250
#define EPD_BUFFER_SIZE 4000
enum Orientation {
PORTRAIT = 0,
LANDSCAPE = 1
};
enum RefreshMode {
FULL_REFRESH = 0,
PARTIAL_REFRESH = 1
};
class EPD128x250 {
public:
EPD128x250(int8_t rst, int8_t dc, int8_t cs, int8_t busy,
int8_t mosi = -1, int8_t clk = -1);
bool begin(SPIClass *spiInstance = nullptr);
void end();
// Display control
void clearDisplay(bool white = true);
void display(RefreshMode mode = FULL_REFRESH);
void displayPartial(int16_t x, int16_t y, int16_t w, int16_t h);
void sleep();
void setRotation(uint8_t rotation);
Orientation getOrientation() { return _orientation; }
// Drawing functions
void fillScreen(bool black = false);
void drawPixel(int16_t x, int16_t y, bool black = true);
void drawHLine(int16_t x, int16_t y, int16_t w, bool black = true);
void drawVLine(int16_t x, int16_t y, int16_t h, bool black = true);
void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, bool black = true);
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, bool black = true);
// Text functions
void setTextSize(uint8_t size);
void setCursor(int16_t x, int16_t y);
void setTextColor(bool black);
void setLineSpacing(uint8_t spacing);
void print(const char* text);
void print(const String& text);
void println(const char* text);
void println(const String& text);
int16_t getCursorX() { return _cursor_x; }
int16_t getCursorY() { return _cursor_y; }
// Buffer access
uint8_t* getBuffer() { return _buffer; }
void clearBuffer();
// Utility functions
int16_t width();
int16_t height();
bool isBusy();
private:
int8_t _rst, _dc, _cs, _busy, _mosi, _clk;
SPIClass *_spi;
bool _spiOwned;
uint8_t _buffer[EPD_BUFFER_SIZE];
Orientation _orientation;
uint8_t _rotation;
int16_t _width, _height;
int16_t _cursor_x, _cursor_y;
uint8_t _text_size;
uint8_t _line_spacing;
bool _text_color;
void reset();
void initDisplay();
void waitBusy(uint32_t timeout_ms = 15000);
void spiWrite(uint8_t data, bool isCommand = false);
void sendBuffer();
void sendPartialBuffer(int16_t x, int16_t y, int16_t w, int16_t h);
void refreshDisplay();
void refreshPartial();
void loadFullRefreshLUT();
void loadPartialRefreshLUT();
void drawChar(int16_t x, int16_t y, unsigned char c, bool color, uint8_t size);
static const uint8_t LUT_VCOM_FULL[56];
static const uint8_t LUT_WW_FULL[56];
static const uint8_t LUT_BW_FULL[56];
static const uint8_t LUT_WB_FULL[56];
static const uint8_t LUT_BB_FULL[56];
static const uint8_t LUT_VCOM_PARTIAL[56];
static const uint8_t LUT_WW_PARTIAL[56];
static const uint8_t LUT_BW_PARTIAL[56];
static const uint8_t LUT_WB_PARTIAL[56];
static const uint8_t LUT_BB_PARTIAL[56];
};
#endif
I’m working on a 3D printed case to hold it. I’ll post that when completed.