tft display with esp32 made in china

TFT_display_init() Perform display initialization sequence. Sets orientation to landscape; clears the screen. SPI interface must already be setup, tft_disp_type, _width, _height variables must be set.

compile_font_file Function which compiles font c source file to binary font file which can be used in TFT_setFont() function to select external font. Created file has the same name as source file and extension .fnt

tft display with esp32 made in china

The TFT display is a kind of LCD that is connected to each pixel using a transistor and it features low current consumption, high-quality, high-resolution and backlight. This 2.8-inch full color LCD has a narrow PCB display. The resolution is 320×280 pixels and it has a four-wire SPI interface and white backlight.

tft display with esp32 made in china

You may be getting ground bounce issues due to long wires between the boards. Try adding extra 0V (GND) connections and keep all the wires as short as possible. The best option is to use an UNO style ESP32 board with the display as this is a tested combination that is less error prone.

tft display with esp32 made in china

We have used Liquid Crystal Displays in the DroneBot Workshop many times before, but the one we are working with today has a bit of a twist – it’s a circle!  Perfect for creating electronic gauges and special effects.

LCD, or Liquid Crystal Displays, are great choices for many applications. They aren’t that power-hungry, they are available in monochrome or full-color models, and they are available in all shapes and sizes.

Today we will see how to use this display with both an Arduino and an ESP32. We will also use a pair of them to make some rather spooky animated eyeballs!

There are also some additional connections to the display. One of them, DC, sets the display into either Data or Command mode. Another, BL, is a control for the display’s backlight.

The above illustration shows the connections to the display.  The Waveshare display can be used with either 3.3 or 5-volt logic, the power supply voltage should match the logic level (although you CAN use a 5-volt supply with 3.3-volt logic).

Another difference is simply with the labeling on the display. There are two pins, one labeled SDA and the other labeled SCL. At a glance, you would assume that this is an I2C device, but it isn’t, it’s SPI just like the Waveshare device.

This display can be used for the experiments we will be doing with the ESP32, as that is a 3.3-volt logic microcontroller. You would need to use a voltage level converter if you wanted to use one of these with an Arduino Uno.

The Waveshare device comes with a cable for use with the display. Unfortunately, it only has female ends, which would be excellent for a Raspberry Pi (which is also supported) but not too handy for an Arduino Uno. I used short breadboard jumper wires to convert the ends into male ones suitable for the Arduino.

Once you have everything hooked up, you can start coding for the display. There are a few ways to do this, one of them is to grab the sample code thatWaveshare provides on their Wiki.

The Waveshare Wiki does provide some information about the display and a bit of sample code for a few common controllers. It’s a reasonable support page, unfortunately, it is the only support that Waveshare provides(I would have liked to see more examples and a tutorial, but I guess I’m spoiled by Adafruit and Sparkfun LOL).

Open the Arduino folder. Inside you’ll find quite a few folders, one for each display size that Waveshare supports. As I’m using the 1.28-inch model, I selected theLCD_1inch28folder.

When you open the sketch, you’ll be greeted by an error message in your Arduino IDE. The error is that two of the files included in the sketch contain unrecognized characters. The IDE offers the suggestion of fixing these with the “Fix Encoder & Reload” function (in the Tools menu), but that won’t work.

The error just seems to be with a couple of the Chinese characters used in the comments of the sketch. You can just ignore the error, the sketch will compile correctly in spite of it.

You can see from the code that after loading some libraries we initialize the display, set its backlight level (you can use PWM on the BL pin to set the level), and paint a new image. We then proceed to draw lines and strings onto the display.

After uploading the code, you will see the display show a fake “clock”. It’s a static display, but it does illustrate how you can use this with the Waveshare code.

This library is an extension of the Adafruit GFX library, which itself is one of the most popular display libraries around. Because of this, there isextensive documentation for this libraryavailable from Adafruit.  This makes the library an excellent choice for those who want to write their own applications.

As with the Waveshare sample, this file just prints shapes and text to the display. It is quite an easy sketch to understand, especially with the Adafruit documentation.

The sketch finishes by printing some bizarre text on the display. The text is an excerpt from The Hitchhiker’s Guide to the Galaxy by Douglas Adams, and it’s a sample of Vogon poetry, which is considered to be the third-worst in the Galaxy!

Here is the hookup for the ESP32 and the GC9A01 display.  As with most ESP32 hookup diagrams, it is important to use the correct GPIO numbers instead of physical pins. The diagram shows the WROVER, so if you are using a different module you’ll need to consult its documentation to ensure that you hook it up properly.

The TFT_eSPI library is ideal for this, and several other, displays. You can install it through your Arduino IDE Library Manager, just search for “TFT_eSPI”.

There is a lot of demo code included with the library. Some of it is intended for other display sizes, but there are a few that you can use with your circular display.

To test out the display, you can use theColour_Test sketch, found inside the Test and Diagnostic menu item inside the library samples.  While this sketch was not made for this display, it is a good way to confirm that you have everything hooked up and configured properly.

A great demo code sample is theAnimated_dialsketch, which is found inside theSpritesmenu item.  This demonstration code will produce a “dial” indicator on the display, along with some simulated “data” (really just a random number generator).

In order to run this sketch, you’ll need to install another library. Install theTjpeg_DecoderLibrary from Library Manager. Once you do, the sketch will compile, and you can upload it to your ESP32.

One of my favorite sketches is the Animated Eyes sketch, which displays a pair of very convincing eyeballs that move. Although it will work on a single display, it is more effective if you use two.

The first thing we need to do is to hook up a second display. To do this, you connect every wire in parallel with the first display, except for the CS (chip select) line.

The Animated Eyes sketch can be found within the sample files for the TFT_eSPI library, under the “generic” folder.  Assuming that you have wired up the second GC9A01 display, you’ll want to use theAnimated_Eyes_2sketch.

The GC9A01 LCD module is a 1.28-inch round display that is useful for instrumentation and other similar projects. Today we will learn how to use this display with an Arduino Uno and an ESP32.

tft display with esp32 made in china

In this project, we will make few video games using ESP32 & 3.5 inch ILI9488 TFT Touch Screen Display. The customized board is designed and manufactured by

But in this project, we will not be using the Camera or the SD Card slot. Rather we will use the ESP32 & ILI9488 TFT Touch Screen Display and write the Arduino Code for video game support. The board can be programmed with the Arduino Code or Micropython code. But this section explains the use of Arduino Code to make video games.

This is a beautiful 3.5" TFT touchscreen display, based on ESP32-WROVER chip, with a built-in 2M pixel OV2640 camera. The combination of all these gives a perfect platform for ESP32 Application like Video Games.

The TFT LCD driver is basically ILI9488 & has a dimension of 3.5″ with 320x480 screen resolution. The ILI9488 LCD uses SPI for communication with the ESP32 chip. The SPI main clock could be up to 60M~80M, make the display smooth enough for videos. The camera module on this board is an OV2640 Camera with a 2MP resolution.

With this camera, you can make applications such as remote photography, face recognition & security system projects. While the camera is not used, you can freely use all these pins with the breakout connectors. You can then connect the ESP32 display with sensors or modules & use it for any IoT applications. The ESP32 chip support Arduino or MicroPython programming.

The board is having a micro SD-Card slot for attaching an external SD-Card. The SD Card can be used for storing files and images. There is a type C USB Port, basically a USB to UART converter for ESP32 programming. You can connect a Type-C data cable to the board & directly upload the code to the Board.

There are two versions of ESP32 3.5″ TFT Touch Screen with Camera. One is the Capacitive Type and the other the resistive type. You can use any of the display that you want. The purchase Link for both the display is given below.

LovyanGFX Library is a library for LCD Graphics driver with touch for ESP32 and SAMD51. It supports the TFT Touch Screen Display like ILI9163, ILI9342, ILI9341, ILI9486, ILI9488, ST7735, ST7789, ST7796, SSD1351. Download and add this library to the Arduino IDE:

2048 is often played on a gray 4x4 grid, with numbered tiles that slide when a player moves them using the four arrow keys. Every turn, a new tile will randomly appear in an empty spot on the board with a value of either 2 or 4. Tiles slide as far as possible in the chosen direction until they are stopped by either another tile or the edge of the grid. If two tiles of the same number collide while moving, they will merge into a tile with the total value of the two tiles that collided. The resulting tile cannot merge with another tile again in the same move.

The given link contains the code/program folder for ESP32 TFT Touch Screen Display based 2048 video game. You can download the code and extract it. The select the ESP32 Board & upload the code to the ESP32 Board:

Flappy Bird is an arcade-style game in which the player controls the bird Faby, which moves persistently to the right. The player is tasked with navigating Faby through pairs of pipes that have equally sized gaps placed at random heights. Faby automatically descends and only ascends when the player taps the touchscreen. Each successful pass through a pair of pipes awards the player one point. Colliding with a pipe or the ground ends the gameplay.

The given link contains the code/program folder for ESP32 ILI9488 TFT Touch Screen Display based Flappy Bird Video Game. You can download the code and extract it. The select the ESP32 Board & upload the code to the ESP32 Board: Source Code.

tft display with esp32 made in china

Developed by Espressif Systems in Shanghai, China, the ESP32 board is a low-cost, low-power system-on-chip microcontroller. It even has Bluetooth and Wi-Fi built in.

This impressive augmented reality headset is built using a Wemos D1 Mini ESP32 board. Other components include an MPU6050 IMU, two 1.54-inch LCD displays based on the ST7789 driver, 1mm thick mirrors, LiPo battery, TP4056 battery manager, push-buttons, and resistors.

Ever wanted to play old-school Sega Genesis and Master System music? With the MegaGRRL, you can do just that! The music is accessed via an SD card and played using original sound chips.

The difficulty level of this project is intermediate. The parts required to build it include an ESP32, Yamaha YM2612 or YM3438 sound chip, TI SN76489AN sound chip, 3.5mm headphone jack for audio output, SD card slot for storage, 2.8-inch LCD display, push-buttons, power switch, D-pad, LEDs for status indicators, and 9~12V DC 599 mA battery for power.

This is a small chessboard built with an ESP32. It allows you to play matches with other people online while retaining an authentic over-the-board (OTB) experience.

Furthermore, if you had two sets of these boards, then you and a friend could play it with real chess pieces! The 3D models provided can be printed using either FDM printing or resin.

The difficulty level of this project is hard. The core components required are an ESP32, Arduino IOT33, 16-bit multiplexer, 8-bit multiplexer, analog Hall sensor, electromagnet, buck converter, resistors, magnets, stepper drivers, 12V power adapter, and a slip ring.

Aluminum composite sheet and wood veneer were used for the board surface, while an aluminum exterior frame was added for support. The interior is made of MDF to hold the electronics, whereas the bottom plate is made of aluminum composite sheet. The chess pieces were created with a CNC machine!

Snake is a classic game that many people will recall playing on early mobile phones. Players control a simplistic on-screen snake. As the snake eats dots, it grows in length until its own tail becomes an obstacle in the game: colliding with that or the screen edges results in game over.

A hardware-based version of Snake is the focus of this project and the code for the game is available on Instructables. The core components required are an ESP32, breadboard, VGA port, VGA monitor, perfboard, and four push-buttons to control the snake.

Initially designed as an educational toy, the fully assembled version of the Retro ESP PCB is a drop-in replacement for the existing one in a Game Boy. Able to emulate a wide range of old-school consoles, it has full support for the ESP-ISP Dev toolchain, the Arduino toolchain, and utilizes the ESP32 WROVER board.

To build your own from scratch will take considerable skill. To help you, the maker has included the full details for how to make your own PCB. Other components required are capacitors, microSD card slot, LEDs, MOSFET, transistors, SMD resistors, SPDT slide switch, Wi-Fi module, linear regulator, lithium charger IC, audio amplifier, and a TFT display.

Here’s a new take on the classic game of Tetris. Difficult to make, this project uses an ESP32 and addressable WS2812B LED strips to recreate the falling tetrominoes. Additional components required include a frame, wires, and power supply.

Instead, you could build your very own claw machine controller for a fraction of the cost, able to connect to and control online claw machines thanks to ESP32"s Wi-Fi capabilities.

The difficulty level of this project is intermediate. The core components required are an ESP32, joystick module, push-button, perfboard, resistor, LiPo battery, and battery holder.

The maker has prototyped it with a breadboard first and notes that although the label on the joystick module states it’s 5V, connecting the joystick via 3.3V is still acceptable.

The Raspberry Pi with RetroPie is often used for retro gaming emulation, but ESP32 can also be used to reproduce some classic arcade games written in the easy-to-program MicroPython language.

The difficulty level of this project is intermediate. The maker shows how to create some of the classics such as Bomber, Breakout, and Snake. These games will run on ESP32 with an output to a VGA monitor.

While there are plenty of ESP32 projects that run Doom, this maker has gone on to further modify and customize it. The difficulty level of this project is intermediate.

An LCD screen is connected to an ESP32-DevKitC and the game can be controlled with momentary push-button switches. WAD files for Doom modifications are stored on an SD card. For sound, an audio amplifier is connected to a tiny speaker. Other components required for the project are resistors, capacitors, and jumper wires.

As the name of the project suggests, this is the world’s tiniest Game Boy Color, made with an ESP32! The difficulty level of this project is hard. Core components include an ESP-WROOM-32, a tiny speaker less than 1cm in diameter, a 150 mAh lithium ion battery, and a small 800x600 color OLED screen.

In this guide, we have taken a look at ten great gaming projects made with an ESP32 board. Most of them require some sort of controller and a display. Others make use of SD card modules, LEDs, batteries, capacitors, and other electronic components.

Now it is up to you which project to dive into. Before choosing one, you"ll want to consider a suitable ESP32 module and the availability of other components required to build your project.

tft display with esp32 made in china

This post is an introduction to the Nextion display with the Arduino. We’re going to show you how to configure the display for the first time, download the needed resources, and how to integrate it with the Arduino UNO board. We’ll also make a simple graphical user interface to control the Arduino pins.

Nextion is a Human Machine Interface (HMI) solution. Nextion displays are resistive touchscreens that makes it easy to build a Graphical User Interface (GUI). It is a great solution to monitor and control processes, being mainly applied to IoT applications.

The Nextion has a built-in ARM microcontroller that controls the display, for example it takes care of generating the buttons, creating text, store images or change the background. The Nextion communicates with any microcontroller using serial communication at a 9600 baud rate.

To design the GUI, you use the Nextion Editor, in which you can add buttons, gauges, progress bars, text labels, and more to the user interface in an easy way. We have the 2.8” Nextion display basic model, that is shown in the following figure.

The best model for you, will depend on your needs. If you’re just getting started with Nextion, we recommend getting the 3.2” size which is the one used in the Nextion Editor examples (the examples also work with other sizes, but you need to make some changes). Additionally, this is the most used size, which means more open-source examples and resources for this size.

To get started with Nextion, first you need to install Nextion Editor. Go to https://nextion.itead.cc/, select the Resources tab, Download > Nextion Editor and install Nextion Editor. You can either download the .zip file or the .exe file.

Connecting the Nextion display to the Arduino is very straightforward. You just need to make four connections: GND, RX, TX, and +5V. These pins are labeled at the back of your display, as shown in the figure below.

You can power up the Nextion display directly from the Arduino 5V pin, but it is not recommended. Working with insufficient power supply may damage the display. So, you should use an external power source. You should use a 5V/1A power adaptor with a micro USB cable. Along with your Nextion display, you’ll also receive a USB to 2 pin connector, useful to connect the power adaptor to the display.

The best way to get familiar with a new software and a new device is to make a project example. Here we’re going to create a user interface in the Nextion display to control the Arduino pins, and display data.

We won’t cover step-by-step how to build the GUI in the Nextion display. But we’ll show you how to build the most important parts, so that you can learn how to actually build the user interface. After following the instructions, you should be able to complete the user interface yourself.

Additionally, we provide all the resources you need to complete this project. Here’s all the resources you need (be aware that you may need to change some settings on the user interface to match your display size):

We’ll start by adding a background image. To use an image as a background, it should have the exact same dimensions as your Nextion display. We’re using the 2.8” display, so the background image needs to be 240×320 pixels. Check your display dimensions and edit your background image accordingly. As an example, we’re using the following image:

Note: At the time of writing this instructions there is an issue with font types. Whatever font type you chose, it will always look the same.Still, you can edit the font size and if it is bold or not.

At this moment, you can start adding components to the display area. For our project, drag three buttons, two labels and one slider, as shown in the figure below. Edit their looks as you like.

Our second page will display data from the DHT11 temperature and humidity sensor. We have several labels to hold the temperature in Celsius, the temperature in Fahrenheit, and the humidity. We also added a progress bar to display the humidity and an UPDATE button to refresh the readings. The bBack button redirects to page0.

Notice that we have labels to hold the units like “ºC”, “ºF” and “%”, and empty labels that will be filled with the readings when we have our Arduino code running.

Once the GUI is ready, you need to write the Arduino code so that the Nextion can interact with the Arduino and vice-versa. Writing code to interact with the Nextion display is not straightforward for beginners, but it also isn’t as complicated as it may seem.

A good way to learn how to write code for the Arduino to interact with the Nextion display is to go to the examples folder in the Nextion library folder and explore. You should be able to copy and paste code to make the Arduino do what you want.

The first thing you should do is to take note of your components in the GUI that will interact with the Arduino and take note of their ID, names and page. Here’s a table of all the components the code will interact to (your components may have a different ID depending on the order you’ve added them to the GUI).

After that, you define led1 and led2. These variables refer to the digital pins 8 and 9 respectively. (led 1 will be controlled with the ON and OFF buttons of the user interface, and led2 brightness will be controlled using the slider).

Here you use the page ID, the component ID and their name – just check the table above with all the components. To define a text you use NexText, to define a button you use NexButton, for a slider you use NexSlider and for the progress bar you use NexProgressBar.

This function will set the led1 to HIGH, as well as update the tState label with the text “State: on”. Updating text labels is as simple as using setText().

Finally, you need a function for the bUpdate (the update button). When you click this button the DHT temperature and humidity sensor reads temperature and humidity and displays them on the corresponding labels, as well as the humidity on the progress bar. That is the bUpdatePopCallback() function.

In this post we’ve introduced you to the Nextion display. We’ve also created a simple application user interface in the Nextion display to control the Arduino pins. The application built is just an example for you to understand how to interface different components with the Arduino – we hope you’ve found the instructions as well as the example provided useful.

In our opinion, Nextion is a great display that makes the process of creating user interfaces simple and easy. Although the Nextion Editor has some issues and limitations it is a great choice for building interfaces for your electronics projects. We have a project on how to create a Node-RED physical interface with the Nextion display and an ESP8266 to control outputs. Feel free to take a look.

tft display with esp32 made in china

The ST7789 TFT module contains a display controller with the same name: ST7789. It’s a color display that uses SPI interface protocol and requires 3, 4 or 5 control pins, it’s low cost and easy to use. This display is an IPS display, it comes in different sizes (1.3″, 1.54″ …) but all of them should have the same resolution of 240×240 pixel, this means it has 57600 pixels. This module works with 3.3V only and it doesn’t support 5V (not 5V tolerant).

The ST7789 display module shown in project circuit diagram has 7 pins: (from right to left): GND (ground), VCC, SCL (serial clock), SDA (serial data), RES (reset), DC (or D/C: data/command) and BLK (back light).

As mentioned above, the ST7789 TFT display controller works with 3.3V only (power supply and control lines). The display module is supplied with 3.3V (between VCC and GND) which comes from the Arduino board.

To connect the Arduino to the display module, I used voltage divider for each line which means there are 4 voltage dividers. Each voltage divider consists of 2.2k and 3.3k resistors, this drops the 5V into 3V which is sufficient.

The first library is a driver for the ST7789 TFT display which can be installed from Arduino IDE library manager (Sketch —> Include Library —> Manage Libraries …, in the search box write “st7789” and install the one from Adafruit).

tft display with esp32 made in china

This project uses the SPIFFS (ESP32 flash memory) to store images used as background. You"ll need to upload these to the ESP32 before you upload the sketch to the ESP32. For this you"ll need the ESP32 Sketch Data Upload tool.

You can download this from Github: "https://github.com/me-no-dev/arduino-esp32fs-plugin". Follow the instructions on the Github to install the tool:Download the tool archive from releases page.

Before you upload the data folder to the ESP32, you"ll first have to select the right partitioning scheme.Go to Tools -> Board and select ESP32 Dev Module.

Firstly, depending on the board you are using (with resistive touch, capacitive touch, or no touch) you will have to uncomment the correct one. For example, if you are using the ESP32 TouchDown uncomment: "#define ENABLE_CAP_TOUCH". If you are using a DevKitC with separate TFT, uncomment "#define ENABLE_RES_TOUCH".

You can also set the scale of the y-axis of the graphs. This is done under "// The scale of the Y-axis per graph". If these are to big or to small, the data will not be displayed correctly on the graph. You might have to experiment with these.

Go ahead and upload the Bluetooth-System-Monitor.ino sketch to the ESP32. The settings under tools besides the Partition Scheme can be left to the default (see image). Go to "Sketch" and select "Upload". This may take a while because it is a large sketch.