2.4-inch ESP32 Dispaly Arduino Tutorial

From Elecrow
Jump to navigation Jump to search

Overview

This tutorial introduces how to configure the Arduino programming environment and how to set up the board.

The tutorial examples include the lvgl demo example (When you first received it, the demo it demonstrated after you powered it up), and how to connect the esp terminal to some sensors/modules.

Development environment configuration

  • 1. Please go to the official website https://www.arduino.cc/ to download the Arduino IDE development tool. Open the Arduino IDE after the installation:

Image (1).png
Image (2).png
Image (3).png
Esp32rgb 3.png

  • 2. Download the libraries provided by Elecrow. Copy them to the library folder in the Arduino installation directory.

If you don't know the path of Arduino library directory, you can open Arduino IDE→Files→Preferences:
Arduino-sketchbook-location.jpg

  • Add the ESP32 S3 URL as follows:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Esp32rgb 5.png

  • The tool automatically downloads and updates the corresponding model, check the steps as shown in the figure:

Image (7).png
Image (8).png
NOTE: Please install esp32 version 2.0.3, if you install another version,some modules may go wrong.

Board settings:

  • 1. Under the "Tools" menu, see "Board: ESP32-XXX" and select ESP32-WROOM-DA MODULE as shown in the figure.

Image (9).png

  • 2. Under the "Tools" menu, see "Partition scheme" and select Huge APP(3MB No OTA/1MB SPIFFS)

Image (10).png

  • Noted:
  • If the CH340 driver is not installed on your PC, please install the CH340 driver first, or switch the SWITCH to the USB position and connect it with a USB cable.

Download process

  • 1. Connect the motherboard and computer through a USB to type-c data cable;

Usb1.jpg

  • 2. Click on the tool on the arduino software and select the corresponding serial port number;

2.4inch-board setting.jpg

  • 3. Click "upload" to upload the program to the ESP32 motherboard

Esp32rgb 17.png

  • Until the prompt upload is successful, as shown in the figure:

Esp32rgb 18.png

LVGL Widgets Demo

Click here to watch the tutorial video.
Lvgl-widgets-demo.jpg

Connect with Crowtails/Modules

Example 1 Let the LED to turn on or turn off .

  • Plug the LED module to GPIO-D Port.
  • Upload the A-LED_Blink to ESP display.

Image (21).png

  • Running result:

D24.jpg

Example 2 Control the display of an external OLED screen through I2C.

  • Plug the OLED screen to the I2C port.
  • Please check if you have installed the library U8g2
  • Upload the code Download A-IIC-Screen to the ESP display.

Image (22).png

  • Running result:

I24.jpg

Example 3 Control the output of speaker.

  • Plug the speaker into SPK port.
  • Please check if you have installed the library XT_DAC_Audio
  • Upload the code SPEAK to the ESP display

Image (23).png

  • Running result:

F24.jpg

Example 4 Initialize Micro TF Card slot.

  • Please check if you have installed the library SD
  • Upload the code A-3.5-TF to the ESP display

Image (24).png

  • Running result:

Image (25).png

Example 5 initialize the touch signal.

  • Please check if you have install the library TFT_eSPI
  • Upload the code A-2.4-TOUCH to ESP display

Image (26).png

  • Running result:

Image (32).png

Example 6 initialize the interact communication of UART .

Image (27).png

Example 7 initialize the interact communication of Bluetooth.

  • Please check if you have installed the library BLE
  • Upload the code A-BLE to the ESP display.

Image (28).png

  • Running result:

B.jpg

Example 8 initialize the interact communication of WIFI.

  • Please check if you have installed the bilrary WiFi
  • Upload the code A-WIFI to the ESP display.

Image (29).png

  • Running result:

Image (30).png


Resources