Value Your Project: Use Graphic Display!

About: Do you like technology? Follow my channel on Youtube and my Blog. In them I put videos every week of microcontrollers, arduinos, networks, among other subjects. New tutorials on Tuesdays and Fridays.

In our video today, I'm going to show you the 1.8-inch TFT display. This is a 128-by-160 graphic display. It is larger than what comes in the ESP32 LoRa, and I will also show its use in the traditional ESP32. We will then have the assembly and source code to use this display with these two models of microcontrollers, using an example made by Adafruit. I specifically find display to be a very important feature, as it gives you feedback from your circuit.

Step 1: Demonstration

Step 2: Resources Used

• ESP32-WROOM

• ESP32 LoRa

• Display TFT Lcd 1.8 ''

• Protoboard

• Jumpers

Step 3: Assembly

Step 4: TFT 1.8 '' Pinout Display

Step 5: ESP-WROOM32 Mounting With TFT Display 1.8 ''

Step 6: ESP-WROOM32 Connection Table and TFT1.8 '' Display

Step 7: ESP32 LoRa Mount With TFT Display 1.8 ''

Step 8: ESP32 LoRa Connection Table and TFT1.8 '' Display

Step 9: Installing Libraries - Arduino IDE

Download the two ZIP files by accessing the links below:

Adafruit GFX Library: https://github.com/adafruit/Adafruit-GFX-Library

Adafruit ST7735 Library: https://github.com/adafruit/Adafruit-ST7735-Library

1. With the Arduino IDE open, click Sketch -> Add Library -> Add Library .ZIP

2. Browse for the downloaded file, select and click Open

3. Do this for both downloaded libraries

Step 10: Code

ESP-WROOM Code 32

Declarations and variables

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 #include <SPI.h> // These pins will also work for the 1.8" TFT shield //ESP32-WROOM #define TFT_DC 12 //A0 #define TFT_CS 13 //CS #define TFT_MOSI 14 //SDA #define TFT_CLK 27 //SCK #define TFT_RST 0 #define TFT_MISO 0 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST);

ESP32 LoRa code

Declarations and variables

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 #include <SPI.h> #define TFT_DC 17 //A0 #define TFT_CS 21 //CS #define TFT_MOSI 2 //SDA #define TFT_CLK 23 //SCK #define TFT_RST 0 #define TFT_MISO 0 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST);

Step 11: ESP32 Code

Note

• The graphics code used is an example developed by the manufacturer Adafruit: https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/examples/graphicstest/graphicstest.ino

• However, the pins declared in the code have been changed to work with the ESP32 previously shown.

• The purpose of this lesson is to only teach communication between the display and the ESP32.

Step 12: Build Settings

The build configurations are shown in the images below. The boards are ESP32 Dev Module and Heltec_WIFI_LoRa_32

Step 13: Links

Step 14: File

Download the files:

PDF

INO

Share

    Recommendations

    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest
    • Beauty Tips Contest

      Beauty Tips Contest
    • Classroom Science Contest

      Classroom Science Contest

    Discussions