TTGO T-Display

img

Simple Example

dependencies

1
2
3
lib_deps =    
    https://github.com/ESP32Home/TFT_eSPI_ttgo_t-display.git#2.3.4_t-display
    https://github.com/ESP32Home/GfxUi.git#v1.0.1

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <Arduino.h>
#include <TFT_eSPI.h>
#include <SPI.h>
#include "GfxUi.h"
#include <SPIFFS.h>

TFT_eSPI tft = TFT_eSPI(135, 240);
GfxUi ui = GfxUi(&tft);

void setup()
{
    Serial.begin(115200);

    tft.init();
    tft.setRotation(3);
    SPIFFS.begin(true);//FORMAT_SPIFFS_IF_FAILED
    ui.drawBmp("/esp_home.bmp", 0, 0);//'ui' needs tft and SPIFF

    tft.setCursor(0, 0);
    tft.setTextColor(TFT_GREEN);
    tft.setTextSize(2);
    tft.drawString("Hello TFT World",  tft.width() / 2, tft.height() / 2 );

}

void loop()
{

}

Display

  • IPS ST7789V
  • 1,14 Zoll
  • 135x240

Suppliers