📄 lcd5110_numberfonts.pde
字号:
// LCD5110_NumberFonts (C)2011 Henning Karlsen// web: http://www.henningkarlsen.com/electronics//// This program is a demo of the included number-fonts,// and how to use them.//// This program requires a Nokia 5110 LCD module.//// It is assumed that the LCD module is connected to// the following pins using a levelshifter to get the// correct voltage to the module.// SCK - Pin 8// MOSI - Pin 9// DC - Pin 10// RST - Pin 11// CS - Pin 12//#include <LCD5110_Basic.h>LCD5110 myGLCD(8,9,10,11,12);extern uint8_t SmallFont[];extern uint8_t MediumNumbers[];extern uint8_t BigNumbers[];void setup(){ myGLCD.InitLCD();}void loop(){ for (int i=0; i<=10000; i++) { myGLCD.setFont(MediumNumbers); myGLCD.printNumF(float(i)/3, 2, RIGHT, 0); myGLCD.setFont(BigNumbers); myGLCD.printNumI(i, RIGHT, 24); } myGLCD.setFont(SmallFont); myGLCD.print("| |", CENTER, 16); delay(500); for (int i=0; i<12; i++) { myGLCD.print("\\", 6+(i*6), 16); delay(500); } myGLCD.clrScr();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -