Skip to content

Reusable font with seven-segment numbers only, designed for Nokia 5110 display

License

Notifications You must be signed in to change notification settings

vlna/Seven-segment-numbers-16x28

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Seven-segment-numbers-16x28

Reusable font with seven-segment numbers only, designed for Nokia 5110 display

Real preview

Usage with Arduino

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();

About

Reusable font with seven-segment numbers only, designed for Nokia 5110 display

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%