mirror of
				https://github.com/digistump/DigistumpArduino.git
				synced 2025-11-03 21:14:46 -08:00 
			
		
		
		
	switch to setup for Arduino Boards Manager
This commit is contained in:
		@@ -0,0 +1,44 @@
 | 
			
		||||
// UTFT_Textrotation_Demo (C)2013 Henning Karlsen
 | 
			
		||||
// web: http://www.henningkarlsen.com/electronics
 | 
			
		||||
//
 | 
			
		||||
// This program is a demo of the textrotation-functions.
 | 
			
		||||
//
 | 
			
		||||
// 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 BigFont[];
 | 
			
		||||
extern uint8_t SevenSegNumFont[];
 | 
			
		||||
 | 
			
		||||
UTFT myGLCD(ITDB24E_16,38,39,40,41);   // Remember to change the model parameter to suit your display module!
 | 
			
		||||
 | 
			
		||||
void setup()
 | 
			
		||||
{
 | 
			
		||||
  myGLCD.InitLCD();
 | 
			
		||||
  myGLCD.clrScr();
 | 
			
		||||
  myGLCD.setFont(BigFont);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void loop()
 | 
			
		||||
{
 | 
			
		||||
    myGLCD.print("Text rotation", 0, 0);
 | 
			
		||||
    myGLCD.setColor(0, 0, 255);
 | 
			
		||||
    myGLCD.print("0 degrees", 0, 16, 0);
 | 
			
		||||
    myGLCD.print("90 degrees", 319, 0, 90);
 | 
			
		||||
    myGLCD.print("180 degrees", 319, 239, 180);
 | 
			
		||||
    myGLCD.print("270 degrees", 0, 239, 270);
 | 
			
		||||
 | 
			
		||||
    myGLCD.setFont(SevenSegNumFont);
 | 
			
		||||
    myGLCD.setColor(0, 255, 0);
 | 
			
		||||
    myGLCD.print("45", 90, 100, 45);
 | 
			
		||||
    myGLCD.print("90", 200, 50, 90);
 | 
			
		||||
    myGLCD.print("180", 300, 200, 180);
 | 
			
		||||
 | 
			
		||||
  while (true) {};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user