https://github.com/schreibfaul1/esp32-tft-library-st7735
https://github.com/schreibfaul1/esp32-tft-library-st7735
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/schreibfaul1/esp32-tft-library-st7735
- Owner: schreibfaul1
- Created: 2021-10-23T14:53:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-23T15:34:29.000Z (over 3 years ago)
- Last Synced: 2025-02-14T05:43:59.338Z (4 months ago)
- Language: C
- Size: 1.36 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ESP32-TFT-Library-ST7735
A library for 1.77'' tft displays with controller ST3357

````c++
#include "Arduino.h"
#include "tft.h"TFT tft;
const uint8_t SPI_MOSI = 23;
const uint8_t SPI_MISO = 19;
const uint8_t SPI_SCK = 18;const uint8_t TFT_DC = 21;
const uint8_t TFT_CS = 22;void setup() {
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
tft.setFrequency(20000000); // 4MHz max
tft.begin(TFT_CS, TFT_DC);
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(TFT_WHITE); tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(TFT_YELLOW); tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(TFT_RED); tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.setTextColor(TFT_GREEN); tft.setTextSize(5);
tft.print("Display");
}//-------------------------------------------------------------------------------------
void loop(void) {}
````