PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UTFT_ViewFont.pde 1.5KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // UTFT_ViewFont (C)2012 Henning Karlsen
  2. // web: http://www.henningkarlsen.com/electronics
  3. //
  4. // This program is a demo of the included fonts.
  5. //
  6. // This demo was made for modules with a screen resolution
  7. // of 320x240 pixels.
  8. //
  9. // This program requires the UTFT library.
  10. //
  11. #include <UTFT.h>
  12. // Declare which fonts we will be using
  13. extern uint8_t SmallFont[];
  14. extern uint8_t BigFont[];
  15. extern uint8_t SevenSegNumFont[];
  16. // Uncomment the next line for chipKit Uno32/uC32
  17. UTFT myGLCD(ITDB24D,34,35,36,37); // Remember to change the model parameter to suit your display module!
  18. // Uncomment the next line for chipKit Max32
  19. //UTFT myGLCD(ITDB24D,82,83,84,85); // Remember to change the model parameter to suit your display module!
  20. void setup()
  21. {
  22. myGLCD.InitLCD();
  23. myGLCD.clrScr();
  24. }
  25. void loop()
  26. {
  27. myGLCD.setColor(0, 255, 0);
  28. myGLCD.setBackColor(0, 0, 0);
  29. myGLCD.setFont(BigFont);
  30. myGLCD.print(" !\"#$%&'()*+,-./", CENTER, 0);
  31. myGLCD.print("0123456789:;<=>?", CENTER, 16);
  32. myGLCD.print("@ABCDEFGHIJKLMNO", CENTER, 32);
  33. myGLCD.print("PQRSTUVWXYZ[\\]^_", CENTER, 48);
  34. myGLCD.print("`abcdefghijklmno", CENTER, 64);
  35. myGLCD.print("pqrstuvwxyz{|}~ ", CENTER, 80);
  36. myGLCD.setFont(SmallFont);
  37. myGLCD.print(" !\"#$%&'()*+,-./0123456789:;<=>?", CENTER, 120);
  38. myGLCD.print("@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_", CENTER, 132);
  39. myGLCD.print("`abcdefghijklmnopqrstuvwxyz{|}~ ", CENTER, 144);
  40. myGLCD.setFont(SevenSegNumFont);
  41. myGLCD.print("0123456789", CENTER, 190);
  42. while(1) {};
  43. }