TFT_Touch_exemplo4_git

Dependencies:   mbed TouchScreen_kbv_mbed MCUFRIEND_kbv_R299 GLUE_STUFF_kbv ADA_GFX_kbv_R1107

TFT_exemplo_4.cpp

Committer:
henriquer
Date:
2021-05-25
Revision:
4:82503142bb76

File content as of revision 4:82503142bb76:

// *******************************Henrique************************************//
//  Programa Teste 1 - Criando Formas Geométricas 
//
// ************** Display TFT-  ILI9341 Triangle******************************\\


//************************ Biblioteca *****************************************//
#include "mbed.h"
#include "Arduino.h"
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;

//****************************************************************************//

//***********************Orientação  Display**********************************//


uint8_t Orientation = 1;  

//****************************************************************************//



//***********************Tabela de Cores**************************************//
#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

//****************************************************************************//

//***********************Escrita no  Display**********************************//
void forma ()
{

    tft.drawTriangle(40, 200, 150, 100, 280, 200, WHITE); 
    //tft.fillTriangle(40, 200, 150, 100, 280, 200, WHITE); 
    tft.setTextColor(RED);
    tft.setTextSize(3);
    tft.setCursor(86, 160); // Orientação X,Y
    tft.println("TRIANGLE");


}

//****************************************************************************//



void setup(void)
{

    tft.reset();
    tft.begin();
    tft.setRotation(Orientation);
    tft.fillScreen(BLACK);  // Fundo do Display
    forma();
    delay(1000);
}

void loop()
{

}