arduino tft lcd gui in stock

New Launch intelligent C-Series 3.5 inch-10.1 inch TFT LCD Display Module SCBRHMI products has been conceived as TFT monitor & Touch controller. It includes processor, control program, driver, flash memory, RS232/ TTL /USB, touchscreen, power supply etcso it is a whole display system based on the powerful & easy operating system, which can be controlled by Any MCU. (Very suitable for your Arduino and Raspberry Pi projects.)
They can be used to perform all basic functions, such as text display, image display, curve display as well as touch function, Video & Audio function etc. It has free GUI design software to offer an easy way to create an intuitive and superb touch user interface even for beginners, the User Interface can be more abundant and various. And the 128M flash memory can store your data, configuration files, image file, font file, video file and audio file etc.
Included GUI Design Software Makes Programming Fast & Easy -Our HMI TFT LCD module is a whole display system that comes with no-cost GUI design software(STONE Designer).

If I press Menu button then it will comes to Menu1 Gui and if I press Menu1 Gui button then it will comes to Menu2 Gui button , How can I make Gui for my slide?
How to synch-up my pages to each other using Back Gui button? Like if I press Page2 Back button then it will comes to Page1 and if I press Page1 back button then it will comes to Home screen? How can I do this ?

The eGTT platform is a drag and drop GUI design software teamed up with rugged industrial feature rich line of full colour UART Embedded HMI TFT displays for medical, industrial or any personal project.
Design your GUI in hours, not days or weeks. Free lifetime support on both hardware and software. Contact us today for any custom or semi-custom requirements you may have.

The uLCD-32TU is a compact and cost effective Intelligent Display Module packed with plenty of features, ready to become the GUI for your target application, and capable of being an interface controller for a number of applications.
The uLCD-32TU is an elegant combination of a 3.2" (240x320) LCD Screen, audio amplifier and speaker, micro-SD card connector, Lithium Battery Support, along with a group of general purpose input/output pins (GPIO"s), including I2C and serial COMMS.
The uLCD-32TU display module serves as a perfect solution to be deployed at the forefront of any product design, requiring a brilliance of colour, animation or images on any application. This PICASO driven Intelligent Display Module is a perfect example of where art meets technology.

The uLCD-220RD features a 30 way 2.54mm pitch male pin header, where all of the IO available on the Diablo16 processor have been broken out for the User. It also features a 10 way 2.54mm pitch male pin header which is common to a majority of 4D Systems display modules, and is used for programming the module with our Workshop4 IDE, using a Programming Cable or Adaptor.
If you are after a unique display solution for your project, maybe an Automotive Gauge or Instrument Dial, or even a Robot Head, look no further than the 4D Systems uLCD-220RD Round TFT LCD Intelligent Display Module.

RTT-GUIis an open source GUI framework for embedded system. The project is forked fromRT-Thread Package -- GUI Engineand has been heavily refactored for Arduino.
RTT-GUI is built on top of the. The later provides low-level device drivers for the former through common and graphic device operations./* common device operations (RT-Thread: "rtdef.h") */struct rt_device_ops {rt_err_t (*init)(rt_device_t dev);rt_err_t (*open)(rt_device_t dev, rt_uint16_t oflag);rt_err_t (*close)(rt_device_t dev);rt_size_t (*read)(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size);rt_size_t (*write)(rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size);rt_err_t (*control)(rt_device_t dev, int cmd, void *args);};
/* graphic device operations (RTT-GUI: "driver.h") */struct rtgui_graphic_driver_ops {void (*set_pixel)(rtgui_color_t *c, int x, int y);void (*get_pixel)(rtgui_color_t *c, int x, int y);void (*draw_hline)(rtgui_color_t *c, int x1, int x2, int y);void (*draw_vline)(rtgui_color_t *c, int x , int y1, int y2);void (*draw_raw_hline)(rt_uint8_t *pixels, int x1, int x2, int y);};
RTT-GUI provides a set of basic graphic functions./* graphic functions (RTT-GUI: "dc.h") */void rtgui_dc_draw_point(rtgui_dc_t *dc, int x, int y);void rtgui_dc_draw_vline(rtgui_dc_t *dc, int x, int y1, int y2);void rtgui_dc_draw_hline(rtgui_dc_t *dc, int x1, int x2, int y);void rtgui_dc_draw_line(rtgui_dc_t *dc, int x1, int y1, int x2, int y2);void rtgui_dc_draw_rect(rtgui_dc_t *dc, rtgui_rect_t *rect);void rtgui_dc_fill_rect(rtgui_dc_t *dc, rtgui_rect_t *rect);void rtgui_dc_draw_round_rect(rtgui_dc_t *dc, rtgui_rect_t *rect, int r);void rtgui_dc_fill_round_rect(rtgui_dc_t *dc, rtgui_rect_t *rect, int r);void rtgui_dc_draw_annulus(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t r1, rt_int16_t r2, rt_int16_t start, rt_int16_t end);void rtgui_dc_draw_pie(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t r, rt_int16_t start, rt_int16_t end);void rtgui_dc_fill_pie(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t r, rt_int16_t start, rt_int16_t end);void rtgui_dc_draw_polygon(rtgui_dc_t *dc, const int *vx, const int *vy, int count);void rtgui_dc_fill_polygon(rtgui_dc_t *dc, const int *vx, const int *vy, int count);void rtgui_dc_draw_circle(rtgui_dc_t *dc, int x, int y, int r);void rtgui_dc_fill_circle(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t r);void rtgui_dc_draw_arc(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t r, rt_int16_t start, rt_int16_t end);void rtgui_dc_draw_ellipse(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t rx, rt_int16_t ry);void rtgui_dc_fill_ellipse(rtgui_dc_t *dc, rt_int16_t x, rt_int16_t y, rt_int16_t rx, rt_int16_t ry);
When finished drawing,rtgui_dc_end_drawing()should be involved to releasedevice contextand trigger rendering process./* device context functions (RTT-GUI: "dc.h") */rtgui_dc_t *rtgui_dc_begin_drawing(rtgui_widget_t *owner);void rtgui_dc_end_drawing(rtgui_dc_t *dc, rt_bool_t update);
RTT-GUI currently supports displaying ASCII and simplified Chinese (Unicode) characters. Two size of fonts are available, 12 and 16 pixel points, for each character set (asc12,asc16,hz12andhz16).
If the SD card driver is available, it is recommended to store the font data (here) in SD card to save space (setCONFIG_USING_FONT_FILE == 1). RTT-GUI by default checks/font/directory for fonts./* font config (RTT-GUI: "guiconfig.h") */#define CONFIG_USING_FONT_12 (0)#define CONFIG_USING_FONT_16 (1)#define CONFIG_USING_FONT_HZ (0)#define CONFIG_USING_FONT_FILE (1)
RTT-GUI currently supports decoding images with the following format:BMPPNG(experimental support), based onLode Vandevenne"s LodePNG projectXPM, RTT-GUI internal used format
All the decoder are optional and configurable./* image decoder config (RTT-GUI: "guiconfig.h") */#define CONFIG_USING_IMAGE_XPM (1)#define CONFIG_USING_IMAGE_BMP (1)#define CONFIG_USING_IMAGE_JPEG (1)#define CONFIG_USING_IMAGE_PNG (0)
/* image functions (RTT-GUI: "image.h") */rtgui_image_t *rtgui_image_create_from_file(const char *type, const char *fn, rt_int32_t scale, rt_bool_t load);rtgui_image_t *rtgui_image_create_from_mem(const char *type, const rt_uint8_t *data, rt_size_t size, rt_int32_t scale, rt_bool_t load);void rtgui_image_destroy(rtgui_image_t *image);void rtgui_image_get_rect(rtgui_image_t *image, rtgui_rect_t *rect);void rtgui_image_blit(rtgui_image_t *image, rtgui_dc_t *dc, rtgui_rect_t *rect);
The most interesting functions are here!RTT-GUI is aclient-serverkind of framework. The server thread starts automatically, which dispatches events to clients. The clients are widgets, which handle events.
Very similar to other event propagation mechanism, a RTT-GUI event is propagating from the topmost widget (a mainWindow) to the deepest widget and the propagation will stop once the event been handled.
EveryRTT-GUI application has to attach to a thread and each thread can be attached byonly one RTT-GUI application.Therefore whenCREATE_APP_INSTANCE()been involved, the new application will attach to the thread that created it. If there is another application already attached,CREATE_APP_INSTANCE()will fail (if so,app == RT_NULL).
The next step is to create a mainWindowholding all other widgets.main_win = CREATE_MAIN_WIN(win_event_handler, "Demo Window",RTGUI_WIN_STYLE_DEFAULT);
Inside the event handler function, we could also involve the defaultWindowevent handler (by involvingDEFAULT_HANDLER(obj)()) and only do something special with the interested events (e.g.PAINT).rt_bool_t win_event_handler(void *obj, rtgui_evt_generic_t *evt) {rt_bool_t done = RT_FALSE;if (DEFAULT_HANDLER(obj)) {done = DEFAULT_HANDLER(obj)(obj, evt);}if (IS_EVENT_TYPE(evt, PAINT)) {done = show_demo(TO_WIN(obj));}return done;}
The parameters ofCREATE_LABEL_INSTANCE():Pointer to parent widget.Pointer to event handler function.Pointer to position and size structure (type:rtgui_rect_t).Label text.
CREATE_BUTTON_INSTANCE()does"t provide the parameter to set position and size. However for any widget, those can be changed by involvingrtgui_widget_set_rect().
A good news is we could use sizer (Box) to automate it.sizer = CREATE_BOX_INSTANCE(main_win, RTGUI_HORIZONTAL, 0);WIDGET_ALIGN_SET(label, STRETCH);WIDGET_ALIGN_SET(btn, STRETCH);rtgui_box_layout(sizer);
The parameters ofCREATE_BOX_INSTANCE():Pointer to parent widget. The parent widget must be aContaineror widget "inherited" fromContainer(e.g.Window).Sizer style,RTGUI_HORIZONTALorRTGUI_VERTICAL.Border size.
When creation complete, the sizer is attached to its parent.rtgui_box_layout()triggers the rearrangement of the positions and sizes of the immediate children of the sizer"s parent.
The final step is to show the mainWindowand spin up the RTT-GUI application.rtgui_win_show(main_win, RT_FALSE);rtgui_app_run(app);DELETE_WIN_INSTANCE(main_win);rtgui_app_uninit(app);
rtgui_app_run()involves theapplication event handlerand doesn"t return until the mainWindowclosed.DELETE_WIN_INSTANCE()andrtgui_app_uninit()then destroy the children widgets and release resources.
Beside programmatical design, a JSON like, text based GUI configuration is also available. The same design in last section can be transformed into the following script.APP: {PARAM: {// name, handler"Demo App", NULL,},MWIN: {PARAM: {// title, handler"Demo Window", hdl,},BOX: {PARAM: {// orient, border size// orient: 1, HORIZONTAL; 2, VERTICAL1, 0,},ID: 0,},LABEL: {PARAM: {// size, handler, textNULL, NULL, "Label Demo",},// CENTER_HORIZONTALTEXTALIGN: 0x01,// RTGUI_ALIGN_STRETCHALIGN: 0x20,},BUTTON: {PARAM: {// handler, type, text// type: 0x00, NORMAL; 0x10, PUSHNULL, 0, "Button Demo",},// RTGUI_ALIGN_STRETCHALIGN: 0x20,},},}
MWINrepresents the mainWindow. There is another element --WIN, represents the normalWindow. One RTT-GUI application can have multiple normalWindows but only one mainWindow.
In sketch side, the first step is involvingrtgui_design_init()to setup parser.design_contex_t ctx;const hdl_tbl_entr_t hdl_tbl[] = {{ "hdl", (void *)win_event_handler },{ RT_NULL, RT_NULL },};obj_tbl_entr_t obj_tbl[1];rtgui_design_init(&ctx, design_read, hdl_tbl, obj_tbl, 1));
The parameters ofrtgui_design_init():Pointer to parser context (value assigned by callee).Pointer to design reading function.Pointer to handler function table.Pointer to object table.Object table size.
When script stored as text file, the function may be defined as below.#define DESIGN_FILE "/design/demo.gui"char buf[512];rt_err_t design_read(char **_buf, rt_uint32_t *sz) {*sz = (rt_uint32_t)read(designFile, buf, sizeof(buf));*_buf = buf;return RT_EOK;}
The next step is paring the design by involvingrtgui_design_parse(). The following example assumes the script is stored as text file.int designFile = -1;designFile = open(DESIGN_FILE, O_RDONLY);rtgui_design_parse(&ctx);close(designFile);
When parsing completed, the requested widget pointers can then be accessed from object table.sizer = (rtgui_box_t *)obj_tbl[0];rtgui_box_layout(sizer);
The RTT-GUI application and mainWindowpointers are available inparser context.rtgui_win_show(ctx.win, RT_FALSE);rtgui_app_run(ctx.app);DELETE_WIN_INSTANCE(ctx.win);rtgui_app_uninit(ctx.app);
You may observe a difference on display after run both demos: For the dynamic design demo, there is no title bar on the mainWindow. The reason is when creating mainWindow, the design parser uses the default style,RTGUI_WIN_STYLE_MAINWIN. However in the other demo, we explicitly use the styleRTGUI_WIN_STYLE_DEFAULT(to show the mainWindowas a normalWindow).
Adafruit 2.8" TFT Touch Shield v2ILI9341 (LCD) with SPI interfaceFT6206 (touch screen) with IIC interfaceSSD1331 (LCD) with SPI interfaceHardware buttons
Generic 0.96" OLED moduleSSD1306 (LCD) with SPI interface/* hardware config (RT-Thread: "rtconfig.h") */// #define CONFIG_USING_ADAFRUIT_TFT_CAPACITIVE// #define CONFIG_USING_TINYSCREEN// #define CONFIG_USING_SSD1306_SPI4
/* RT-Thread device name (RTT-GUI: "guiconfig.h") */#define CONFIG_GUI_DEVICE_NAME "ILI9341" // RGB565#define CONFIG_TOUCH_DEVICE_NAME "FT6206"// #define CONFIG_GUI_DEVICE_NAME "SSD1331" // RGB565// #define CONFIG_KEY_DEVICE_NAME "BTN"// #define CONFIG_GUI_DEVICE_NAME "SSD1306" // MONO/* color */#define CONFIG_USING_MONO (0)#define CONFIG_USING_RGB565 (1)#define CONFIG_USING_RGB565P (0)#define CONFIG_USING_RGB888 (0)
/* RT-Thread device name (RTT-GUI: "guiconfig.h") */#define CONFIG_GUI_DEVICE_NAME "ILI9341"#define CONFIG_TOUCH_DEVICE_NAME "FT6206"/* color */#define CONFIG_USING_MONO (0)#define CONFIG_USING_RGB565 (1)#define CONFIG_USING_RGB565P (0)#define CONFIG_USING_RGB888 (0)/* hardware config (RT-Thread: "rtconfig.h") */#define CONFIG_USING_TINYSCREEN
/* RT-Thread device name (RTT-GUI: "guiconfig.h") */#define CONFIG_GUI_DEVICE_NAME "SSD1331"#define CONFIG_KEY_DEVICE_NAME "BTN"/* color */#define CONFIG_USING_MONO (0)#define CONFIG_USING_RGB565 (1)#define CONFIG_USING_RGB565P (0)#define CONFIG_USING_RGB888 (0)
/* RT-Thread device name (RTT-GUI: "guiconfig.h") */#define CONFIG_GUI_DEVICE_NAME "SSD1306"/* color */#define CONFIG_USING_MONO (1)#define CONFIG_USING_RGB565 (0)#define CONFIG_USING_RGB565P (0)#define CONFIG_USING_RGB888 (0)

The demo is developed based on the HAL library. Download the demo, find the STM32 program file directory, and open the LCD_demo.uvprojx in the STM32\STM32F103RBT6\MDK-ARM directory to check the program.
For the screen, if you need to draw pictures, display Chinese and English characters, display pictures, etc., you can use the upper application to do, and we provide some basic functions here about some graphics processing in the directory STM32\STM32F103RB\User\GUI_DEV\GUI_Paint.c(.h)
image.cpp(.h): is the image data, which can convert any BMP image into a 16-bit true color image array through Img2Lcd (downloadable in the development data).
For the screen, if you need to draw pictures, display Chinese and English characters, display pictures, etc., you can use the upper application to do, and we provide some basic functions here about some graphics processing in the directory GUI_Paint.c(.h)

In this Arduino touch screen tutorial we will learn how to use TFT LCD Touch Screen with Arduino. You can watch the following video or read the written tutorial below.
As an example I am using a 3.2” TFT Touch Screen in a combination with a TFT LCD Arduino Mega Shield. We need a shield because the TFT Touch screen works at 3.3V and the Arduino Mega outputs are 5 V. For the first example I have the HC-SR04 ultrasonic sensor, then for the second example an RGB LED with three resistors and a push button for the game example. Also I had to make a custom made pin header like this, by soldering pin headers and bend on of them so I could insert them in between the Arduino Board and the TFT Shield.
Here’s the circuit schematic. We will use the GND pin, the digital pins from 8 to 13, as well as the pin number 14. As the 5V pins are already used by the TFT Screen I will use the pin number 13 as VCC, by setting it right away high in the setup section of code.
I will use the UTFT and URTouch libraries made by Henning Karlsen. Here I would like to say thanks to him for the incredible work he has done. The libraries enable really easy use of the TFT Screens, and they work with many different TFT screens sizes, shields and controllers. You can download these libraries from his website, RinkyDinkElectronics.com and also find a lot of demo examples and detailed documentation of how to use them.
After we include the libraries we need to create UTFT and URTouch objects. The parameters of these objects depends on the model of the TFT Screen and Shield and these details can be also found in the documentation of the libraries.
So now I will explain how we can make the home screen of the program. With the setBackColor() function we need to set the background color of the text, black one in our case. Then we need to set the color to white, set the big font and using the print() function, we will print the string “Arduino TFT Tutorial” at the center of the screen and 10 pixels down the Y – Axis of the screen. Next we will set the color to red and draw the red line below the text. After that we need to set the color back to white, and print the two other strings, “by HowToMechatronics.com” using the small font and “Select Example” using the big font.
In order the code to work and compile you will have to include an addition “.c” file in the same directory with the Arduino sketch. This file is for the third game example and it’s a bitmap of the bird. For more details how this part of the code work you can check my particular tutorial. Here you can download that file:

Arduino has always helped to build projects easily and make them look more attractive. Programming an LCD screen with touch screen option might sound as a complicated task, but the Arduino libraries and shields had made it really easy. In this project we will use a 2.4” Arduino TFT LCD screen to build our own Arduino Touch Screen calculator that could perform all basic calculations like Addition, Subtraction, Division and Multiplication.
Before we actually dive into the project it is important to know, how this 2.4” TFT LCD Module works and what are the types present in it. Let us take a look at the pinouts of this 2.4” TFT LCD screen module.
As you can see there are 28 pins which will perfectly fit into any Arduino Uno / Arduino Mega Board. A small classification of these pins is given in the table below.
As you can see the pins can be classified in to four main classifications such as LCD Command Pins, LCD Data Pins, SD Card Pins and Power Pins, We need not know much about the detailed working of these pins since they will be take care by our Arduino Library.
You can also find an SD card slot at the bottom of the module shown above, which can be used to load an SD card with bmp image files, and these images can be displayed in our TFT LCD screen using the Arduino Program.
Another important thing to note is your Interface IC. There are many types of TFT modules available in the market starting from the original Adafruit TFT LCD module to cheap Chinese clones. A program which works perfectly for your Adafruit shield might not work the same for Chinese breakout boards. So, it is very important to know which types of LCD display your are holding in hand. This detail has to be obtained from the vendor. If you are having a cheap clone like mine then it is most probably using the ili9341 driver IC.You can follow this TFT LCD interfacing with Arduino tutorial to try out some basic example programs and get comfortable with the LCD screen. Also check out our other TFT LCD projects with Arduino here:
If you planning to use the touch screen function of your TFT LCD module, then you have to calibrate it to make it work properly. A LCD screen without calibration might work unlikely, for instance you might touch at one place and the TFT might respond for a touch at some other place. These calibrations results will not be similar for all boards and hence you are left on your own to do this.
The 2.4” TFT LCD screen is a perfect Arduino Shield. You can directly push the LCD screen on top of the Arduino Uno and it will perfectly match with the pins and slid in through. However, as matters of safety cover the Programming terminal of your Arduino UNO with a small insulation tape, just in case if the terminal comes in contact with your TFT LCD screen. The LCD assembled on UNO will look something like this below.
We are using the SPFD5408 Library to get this arduino calculator code working. This is a modified library of Adafruit and can work seamlessly with our LCD TFT Module. You can check the complete program at the end of this Article.
Now, open Arduino IDE and select Sketch -> Include Librarey -> Add .ZIP library. A browser window will open navigate to the ZIP file and click “OK”. You should notice “Library added to your Libraries” on the bottom-left corner of Arduino, if successful. A detailed guide to do the same is given in the Interfacing Tutorial.
Now, you can use the code below in your Arduino IDE and upload it to your Arduino UNO for the Touch Screen Calculator to work. Further down, I have explained the code into small segments.
As said earlier we need to calibrate the LCD screen to make it work as expected, but don’t worry the values given here are almost universal. The variables TS_MINX, TS_MINY, TS_MAXX, and TS_MAXY decide the calibration of the Screen. You can toy around them if you feel the calibration is not satisfactory.
As we know the TFT LCD screen can display a lot of colours, all these colours have to be entered in hex value. To make it more human readable we assign these values to a variable as shown below.
The final step is to calculate the result and display them on TFT LCD Screen. This arduino calculator can perform operation with 2 numbers only. These two numbers are named as variables “Num1” and “Num2”. The variable “Number” gives and takes value from Num1 and Num2 and also bears the result.
The working of this Arduino Touch Screen Calculator is simple. You have to upload the below given code on your Arduino and fire it up. You get the calculator displayed on your LCD screen.

Nextion is a Human Machine Interface (HMI) solution combining an onboard processor and memory touch display with Nextion Editor software for HMI GUI project development.
Using the Nextion Editor software, you can quickly develop the HMI GUI by drag-and-drop components (graphics, text, button, slider, etc.) and ASCII text-based instructions for coding how components interact on the display side.

New functions have been added to draw smooth (antialiased) arcs, circles, and rounded rectangle outlines. New sketches are provided in the "Smooth Graphics" examples folder. Arcs can be drawn with or without anti-aliasing (which will then render faster). The arc ends can be straight or rounded. The arc drawing algorithm uses an optimised fixed point sqrt() function to improve performance on processors that do not have a hardware Floating Point Unit (e.g. RP2040). Here are two demo images, on the left smooth (anti-aliased) arcs with rounded ends, the image to the right is the same resolution (grabbed from the same 240x240 TFT) with the smoothing diasbled (no anti-aliasing):
An excellent new compatible library is available which can render TrueType fonts on a TFT screen (or into a sprite). This has been developed by takkaO, I have created a branch with some bug fixes here. The library provides access to compact font files, with fully scaleable anti-aliased glyphs. Left, middle and right justified text can also be printed to the screen. I have added TFT_eSPI specific examples to the OpenFontRender library and tested on RP2040 and ESP32 processors, the ESP8266 does not have sufficient RAM due to the glyph render complexity. Here is a demo screen where a single 12kbyte font file binary was used to render fully anti-aliased glyphs of gradually increasing size on a 320x480 TFT screen:
Smooth fonts can now be rendered direct to the TFT with very little flicker for quickly changing values. This is achieved by a line-by-line and block-by-block update of the glyph area without drawing pixels twice. This is a "breaking" change for some sketches because a new true/false parameter is needed to render the background. The default is false if the parameter is missing, Examples:
Frank Boesing has created an extension library for TFT_eSPI that allows a large range of ready-built fonts to be used. Frank"s library (adapted to permit rendering in sprites as well as TFT) can be downloaded here. More than 3300 additional Fonts are available here. The TFT_eSPI_ext library contains examples that demonstrate the use of the fonts.
Users of PowerPoint experienced with running macros may be interested in the pptm sketch generator here, this converts graphics and tables drawn in PowerPoint slides into an Arduino sketch that renders the graphics on a 480x320 TFT. This is based on VB macros created by Kris Kasprzak here.
A feature rich Arduino IDE compatible graphics and fonts library for 32 bit processors. The library is targeted at 32 bit processors, it has been performance optimised for RP2040, STM32, ESP8266 and ESP32 types, other 32 bit processors may be used but will use the slower generic Arduino interface calls. The library can be loaded using the Arduino IDE"s Library Manager. Direct Memory Access (DMA) can be used with the ESP32, RP2040 and STM32 processors with SPI interface displays to improve rendering performance. DMA with a parallel interface (8 and 16 bit) is only supported with the RP2040.
The screen controller, interface pins and library configuration settings must be defined inside the library. They can NOT be defined in the Arduino sketch. See the User_Setup_Select.h file for details. This approach has significant advantages, it keeps the examples clean from long configuration options and once the setup is defined any example can be run without modification. PlatformIO users can define these settings on a per project basis within a platformio.ini file, see Docs folder in library.
Lots of example sketches are provided which demonstrate using the functions in the library. Due to the popularity of the library there are lots of online tutorials for TFT_eSPI that have been created by enthusiastic users.
For other (generic) processors only SPI interface displays are supported and the slower Arduino SPI library functions are used by the library. Higher clock speed processors such as used for the Teensy 3.x and 4.x boards will still provide a very good performance with the generic Arduino SPI functions.
Due to lack of GPIO pins the 8 bit parallel interface is NOT supported on the ESP8266. 8 bit parallel interface TFTs (e.g. UNO format mcufriend shields) can used with the STM32 Nucleo 64/144 range or the UNO format ESP32 (see below for ESP32).
The library supports some TFT displays designed for the Raspberry Pi (RPi) that are based on a ILI9486 or ST7796 driver chip with a 480 x 320 pixel screen. The ILI9486 RPi display must be of the Waveshare design and use a 16 bit serial interface based on the 74HC04, 74HC4040 and 2 x 74HC4094 logic chips. Note that due to design variations between these displays not all RPi displays will work with this library, so purchasing a RPi display of these types solely for use with this library is NOT recommended.
Some displays permit the internal TFT screen RAM to be read, a few of the examples use this feature. The TFT_Screen_Capture example allows full screens to be captured and sent to a PC, this is handy to create program documentation.
The library includes a "Sprite" class, this enables flicker free updates of complex graphics. Direct writes to the TFT with graphics functions are still available, so existing sketches do not need to be changed.
The "Animated_dial" example shows how dials can be created using a rotated Sprite for the needle. To run this example the TFT interface must support reading from the screen RAM (not all do). The dial rim and scale is a jpeg image, created using a paint program.
The XPT2046 touch screen controller is supported for SPI based displays only. The SPI bus for the touch controller is shared with the TFT and only an additional chip select line is needed. This support will eventually be deprecated when a suitable touch screen library is available.
The library supports SPI overlap on the ESP8266 so the TFT screen can share MOSI, MISO and SCLK pins with the program FLASH, this frees up GPIO pins for other uses. Only one SPI device can be connected to the FLASH pins and the chips select for the TFT must be on pin D3 (GPIO0).
Configuration of the library font selections, pins used to interface with the TFT and other features is made by editing the User_Setup.h file in the library folder, or by selecting your own configuration in the "User_Setup_Selet,h" file. Fonts and features can easily be enabled/disabled by commenting out lines.
It would be possible to compress the vlw font files but the rendering performance to a TFT is still good when storing the font file(s) in SPIFFS, LittleFS or FLASH arrays.
Anti-aliased fonts can also be drawn over a gradient background with a callback to fetch the background colour of each pixel. This pixel colour can be set by the gradient algorithm or by reading back the TFT screen memory (if reading the display is supported).
Unfortunately the typical UNO/mcufriend TFT display board maps LCD_RD, LCD_CS and LCD_RST signals to the ESP32 analogue pins 35, 34 and 36 which are input only. To solve this I linked in the 3 spare pins IO15, IO33 and IO32 by adding wires to the bottom of the board as follows:
If you load a new copy of TFT_eSPI then it will overwrite your setups if they are kept within the TFT_eSPI folder. One way around this is to create a new folder in your Arduino library folder called "TFT_eSPI_Setups". You then place your custom setup.h files in there. After an upgrade simply edit the User_Setup_Select.h file to point to your custom setup file e.g.:

Amateur Radio Single Sideband Transceiver Controller for Arduino and SI5351 Clock generator. Includes Dual VFO, single or double band support for 20 and 40 meter bands, CAT control, optional S-meter, multiple supported displays including options include 20x4 LCD, Color TFT, and 2.8" Nextion Touch Screen
Ms.Josey
Ms.Josey