60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
|
// UTFT_ViewFont
|
||
|
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
|
||
|
// web: http://www.RinkyDinkElectronics.com/
|
||
|
//
|
||
|
// This program is a demo of the included fonts.
|
||
|
//
|
||
|
// This demo was made for modules with a screen resolution
|
||
|
// of 320x240 pixels.
|
||
|
//
|
||
|
// This program requires the UTFT library.
|
||
|
//
|
||
|
|
||
|
#include <UTFT.h>
|
||
|
|
||
|
// Declare which fonts we will be using
|
||
|
extern uint8_t SmallFont[];
|
||
|
extern uint8_t BigFont[];
|
||
|
extern uint8_t SevenSegNumFont[];
|
||
|
|
||
|
// Set the pins to the correct ones for your development shield
|
||
|
// ------------------------------------------------------------
|
||
|
// My chipKit Uno32/uC32 shield : <display model>,38,39,40,41
|
||
|
// My chipKit Max32 shield : <display model>,82,83,84,85
|
||
|
// AquaLEDSource All in One Super Screw Shield : <display model>,82,83,84,85
|
||
|
//
|
||
|
// Remember to change the model parameter to suit your display module!
|
||
|
UTFT myGLCD(ITDB32S,82,83,84,85);
|
||
|
|
||
|
void setup()
|
||
|
{
|
||
|
myGLCD.InitLCD();
|
||
|
|
||
|
myGLCD.clrScr();
|
||
|
}
|
||
|
|
||
|
void loop()
|
||
|
{
|
||
|
myGLCD.setColor(0, 255, 0);
|
||
|
myGLCD.setBackColor(0, 0, 0);
|
||
|
|
||
|
myGLCD.setFont(BigFont);
|
||
|
myGLCD.print(" !\"#$%&'()*+,-./", CENTER, 0);
|
||
|
myGLCD.print("0123456789:;<=>?", CENTER, 16);
|
||
|
myGLCD.print("@ABCDEFGHIJKLMNO", CENTER, 32);
|
||
|
myGLCD.print("PQRSTUVWXYZ[\\]^_", CENTER, 48);
|
||
|
myGLCD.print("`abcdefghijklmno", CENTER, 64);
|
||
|
myGLCD.print("pqrstuvwxyz{|}~ ", CENTER, 80);
|
||
|
|
||
|
myGLCD.setFont(SmallFont);
|
||
|
myGLCD.print(" !\"#$%&'()*+,-./0123456789:;<=>?", CENTER, 120);
|
||
|
myGLCD.print("@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_", CENTER, 132);
|
||
|
myGLCD.print("`abcdefghijklmnopqrstuvwxyz{|}~ ", CENTER, 144);
|
||
|
|
||
|
myGLCD.setFont(SevenSegNumFont);
|
||
|
myGLCD.print("0123456789", CENTER, 190);
|
||
|
|
||
|
while(1) {};
|
||
|
}
|
||
|
|