Reusable font with seven-segment numbers only, designed for Nokia 5110 display
Libraries needed
//positions on 84 pixel width display
//16+4+16+4+4+4+16+4+16 = 84
void printHour() {
int local=hour();
if (local / 10 > 0) {
display.drawBitmap(0,0,lcd[local / 10],16,28,BLACK);
}
display.drawBitmap(20,0,lcd[local % 10],16,28,BLACK);
}
void printDelimiter() {
display.fillRect(40,7,4,4,BLACK);
display.fillRect(40,15,4,4,BLACK);
}
void printMinute() {
int local=minute();
display.drawBitmap(48,0,lcd[local / 10],16,28,BLACK);
display.drawBitmap(68,0,lcd[local % 10],16,28,BLACK);
}
Complete drawing may looks like
display.clearDisplay();
printHour();
printMinute();
if (second()%2 == 0) {
printDelimiter();
}
display.display();