Skip to content

Instantly share code, notes, and snippets.

@MrSmartus
Created January 5, 2018 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrSmartus/31fc186fe0b14b38bbc0940883308f14 to your computer and use it in GitHub Desktop.
Save MrSmartus/31fc186fe0b14b38bbc0940883308f14 to your computer and use it in GitHub Desktop.
Font for DMD dot matrix with Arduino, library DMD2. Fullsize font with some symbols. Created for timer project. Tested.
//font 16x8 for DMD. Chars: 30(48) - 39(57)
#include <inttypes.h>
#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined (ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
#ifndef DIGIT_1608_H
#define DIGIT_1608_H
#define DIGIT_16_WIDTH 8
#define DIGIT_16_HEIGHT 16
static const uint8_t digit_1608[] PROGMEM = {
0x30, 0x3A, // size ???? 48 x 58
0x0A, // width 10
0x10, // height 16
0x30, // first char
0x0A, // char count
// char widths
0x07, // 0
0x04, // 1
0x07, // 2
0x07, // 3
0x07, // 4
0x07, // 5
0x07, // 6
0x07, // 7
0x07, // 8
0x07, // 9
// font data
0xFC, 0xFE, 0x03, 0x03, 0x03, 0xFE, 0xFC,
0x3F, 0x7F, 0xC0, 0xC0, 0xC0, 0x7F, 0x3F, //0
0x18, 0x1C, 0xFF, 0xFF,
0x00, 0x00, 0xFF, 0xFF, // 1
0x1E, 0x1F, 0x03, 0x03, 0x03, 0xFF, 0xFE,
0xE0, 0xF0, 0xF8, 0xDC, 0xCE, 0xC7, 0xC3, // 2
0x0E, 0x0F, 0x03, 0x83, 0x83, 0xFF, 0x7E,
0x70, 0xF0, 0xC0, 0xC1, 0xC1, 0xFF, 0x7F, // 3
0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0xFF, 0xFF,
0x0F, 0x0F, 0x0C, 0x0C, 0x0C, 0xFF, 0xFF, // 4
0xFF, 0xFF, 0xC3, 0xC3, 0xC3, 0xC3, 0x83,
0x70, 0xF0, 0xC0, 0xC0, 0xC0, 0xFF, 0x7F, // 5
0xFE, 0xFF, 0xC3, 0xC3, 0xC3, 0xC7, 0x86,
0x7F, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0x7F, // 6
0x07, 0x07, 0x03, 0x03, 0xC3, 0xFF, 0x7F,
0x00, 0x00, 0xF0, 0xFE, 0x1F, 0x03, 0x00, // 7
0xBE, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xBE,
0x7F, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0x7F, // 8
0xFE, 0xFF, 0x03, 0x03, 0x03, 0xFF, 0xFE,
0x61, 0xE3, 0xC3, 0xC3, 0xC3, 0xFF, 0x7F, // 9
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment