TFT_eSPI\User_Setups\Setup73_Heltec_Tracker_S3.h:
#define TFT_WIDTH 80
#define TFT_HEIGHT 160
#define ST7735_DRIVER
#define ST7735_GREENTAB160x80
#define TFT_RGB_ORDER TFT_BGR
#define USE_HSPI_PORT
#define TFT_MISO -1
#define TFT_MOSI 42
#define TFT_SCLK 41
#define TFT_CS 38
#define TFT_DC 40
#define TFT_RST 39
#define TFT_BL 21
#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#undef LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#undef SMOOTH_FONT
#define SPI_FREQUENCY 27000000
#define SPI_TOUCH_FREQUENCY 2500000
main:
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
#include <SPI.h>
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
#define TFT_GREY 0x5AEB // New colour
#define Vext 3
void VextON(void)
{
pinMode(Vext, OUTPUT);
digitalWrite(Vext, HIGH); // active high
}
void VextOFF(void)
{
pinMode(Vext, OUTPUT);
digitalWrite(Vext, LOW);
}
void setup(void) {
USBSerial.begin(115200);
VextON(); // enable power to display
delay(2000);
USBSerial.println(TFT_BL); // prints 21
USBSerial.println(Vext); // prints 3
tft.init();
tft.setRotation(1);
USBSerial.println("Setup done");
}
void loop() {
tft.fillScreen(TFT_GREY);
tft.setCursor(0, 0, 2);
tft.setTextColor(TFT_WHITE,TFT_BLACK);
tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(TFT_YELLOW);
tft.setTextFont(2);
tft.println(1234.56);
tft.setTextColor(TFT_RED,TFT_BLACK); tft.setTextFont(4);
tft.println((long)3735928559, HEX); // Should print DEADBEEF
tft.setTextColor(TFT_GREEN,TFT_BLACK);
tft.setTextFont(2);
tft.println("Groop");
float fnumber = 123.45;
tft.setTextColor(TFT_BLUE); tft.setTextFont(2);
tft.print("Float = "); tft.println(fnumber); // Print floating point number
tft.print("Binary = "); tft.println((int)fnumber, BIN); // Print as integer value in binary
tft.print("Hexadecimal = "); tft.println((int)fnumber, HEX); // Print as integer number in Hexadecimal
USBSerial.println("Done drawing");
while(1) yield(); // We must yield() to stop a watchdog timeout.
}
Unfortunately, this is not working for me, although I should think that I correctly modified the pins (Vext, backlight)… compiling for Wireless Tracker nor plain ESP32S3 does the trick yet.