Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Simply Im writing a program that fetches direct messagess from discord bot api and I want to display them on the screen. Ive run into multiple problems which most of them I managed to make it work. (Playing gifs, uploading them to littlefs, swapping gifs and etc).
Tbh I havent checked ALL of the examples because some are outdated and theres so much of them I just thought that Im going to write here and I might get help.
The problem Im facing right now is pretty simple. I pull a message from discords api. That message contains a handful of words. I cant seem to find a way to
ESP32-Wroom-32U (same old esp, just 38pin version)
ST7789_DRIVER (320x240 from aliexpress)
SPI
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE);
tft.setTextSize(2);
tft.setTextDatum(CC_DATUM);
//this is weird, and I bet there is an easier way to manage this
tft.drawString("Test1",tft.width() / 2,tft.height() / 2 - 15);
tft.drawString("Test2",tft.width() / 2,tft.height() / 2 + 0);
tft.drawString("Test3",tft.width() / 2,tft.height() / 2 + 15);
Basically if it would be possible to provide an example of how would I go about centering a text string while also wrapping it. I would appreciate it.
You will need to write code to split strings at an appropriate point and then plot each segment onto the screen. I do not have further example code to do this.
Basically if it would be possible to provide an example of how would I go about centering a text string while also wrapping it. I would appreciate it.