/*
An example showing rainbow colours on a 1.8" TFT LCD screen
and to show a basic example of font use.
Make sure all the display driver and pin connections are correct by
editing the User_Setup.h file in the TFT_eSPI library folder.
Note that yield() or delay(0) must be called in long duration for/while
loops to stop the ESP8266 watchdog triggering.
#########################################################################
###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ######
#########################################################################
*/
#include "User_Setup.h"
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
unsigned long targetTime = 0;
byte red = 31;
byte green = 0;
byte blue = 0;
byte state = 0;
unsigned int colour = red << 11;
void setup(void) {
Serial.begin(115200);
Serial.printf("HelloWorld\n");
tft.init();
tft.setRotation(1);
tft.fillScreen(ST7735_WHITE); // Background branco
tft.setTextColor(ST7735_BLACK); // Texto preto
tft.setTextSize(2); // Tamanho do texto
//tft.fillScreen(TFT_BLACK);
targetTime = millis() + 100;
}
void loop() {
tft.println("Text");
}
Loading
ili9341-cap-touch
ili9341-cap-touch