Build an Environmental Monitoring Dashboard with CrowPanel 3.5" HMI ESP32 SPI TFT Touch Display
CrowPanel ESP32 • DHT11 • LVGL • Bluetooth Serial

Build an Environmental Monitoring Dashboard with CrowPanel 3.5" HMI ESP32 Display

This tutorial shows how to build an Environmental Monitoring Dashboard using the CrowPanel 3.5" HMI ESP32 Display, DHT11 Temperature and Humidity Sensor, LVGL, TFT_eSPI, and Bluetooth Serial. The project reads temperature and humidity data, displays the values on an LVGL dashboard, and sends the sensor readings through Bluetooth Serial.

Environmental Monitoring CrowPanel ESP32 DHT11 Sensor Bluetooth Control LVGL Dashboard
CrowPanel ESP32 3.5 SPI TFT Display

CrowPanel ESP32 3.5 SPI TFT Display used for the environmental monitoring dashboard.

Overview

This tutorial demonstrates how to create a compact environmental monitoring system using an ESP32-based CrowPanel display and a DHT11 sensor. The dashboard displays temperature and humidity readings on the screen, sends the values through Bluetooth Serial, and allows the screen backlight to be controlled remotely using simple Bluetooth commands.

Project Use Case: This project is useful for indoor climate dashboards, sensor display panels, classroom IoT demonstrations, basic environmental monitoring prototypes, and compact control panels where users need both local display output and Bluetooth-based monitoring.
Indoor Climate Dashboard Sensor Display Panel IoT Monitoring Prototype Bluetooth Data Output

Hardware Components

The hardware includes the CrowPanel 3.5" HMI ESP32 Display and an external DHT11 sensor.

CrowPanel 3.5" HMI ESP32 Display

ESP32-based display module used as the main controller and visual dashboard for the project.

3.5" SPI TFT LCD Display

Built-in 480×320 display used to show the LVGL environmental monitoring dashboard.

DHT11 Temperature and Humidity Sensor

External sensor used to read temperature and humidity values for the dashboard.

Other Hardware

  • Resistive touch panel
  • Jumper wires
  • USB cable for programming
  • Computer or laptop for uploading the Arduino project

Project Files

  • Arduino project source files
  • LVGL UI files
  • Project configuration files
  • TFT_eSPI display configuration
  • Touch calibration settings

Software Used

The software setup uses Arduino IDE, ESP32 board support, LVGL, TFT_eSPI, DHT libraries, and Bluetooth Serial for wireless monitoring and control.

Development and Board Tools

  • Arduino IDE 2.3.7
  • ESP32 Board Package by Espressif Systems version 2.0.17
  • Serial Monitor
  • Bluetooth terminal app or PC Bluetooth Serial tool

Libraries and Features

  • LVGL Library version 8.3.11
  • TFT_eSPI Library version 2.5.43
  • DHT Sensor Library by Adafruit
  • Adafruit Unified Sensor Library
  • Bluetooth Serial Library

Application Discussion

The CrowPanel 3.5" HMI ESP32 Display combines an ESP32 controller, SPI TFT LCD, and resistive touch input. The DHT11 sensor provides temperature and humidity readings, while LVGL and TFT_eSPI work together to create and render the dashboard interface.

CrowPanel 3.5" HMI ESP32 Display

The CrowPanel is an ESP32-based display module with a 480×320 SPI TFT LCD and resistive touch input. It is useful for graphical dashboards, control panels, and sensor monitoring interfaces.

DHT11 Sensor

The DHT11 sensor measures temperature and humidity. In this project, the readings are displayed on the CrowPanel screen and transmitted through Bluetooth Serial approximately every 2 seconds.

Bluetooth Serial

Bluetooth Serial allows the ESP32 to send sensor readings wirelessly and receive simple control commands, such as turning the screen backlight ON or OFF.

LVGL and TFT_eSPI

LVGL is used to create the graphical user interface with widgets such as charts, gauges, panels, labels, and indicators. TFT_eSPI handles communication between the ESP32 and the SPI TFT display, making it important for proper screen initialization, rendering, color output, and display stability.

Hardware Setup

Schematic and Hardware Connections

A schematic or wiring diagram is applicable for this project because an external DHT11 Temperature and Humidity Sensor is connected to the CrowPanel ESP32 board.

Schematic diagram for CrowPanel ESP32 environmental monitoring dashboard

Schematic diagram for connecting the DHT11 sensor to the CrowPanel ESP32 board.

Layman's term diagram: Use the schematic/system diagram above as the hardware wiring guide for connecting the DHT11 sensor to the CrowPanel ESP32 board.
DHT11 to ESP32 Connections
DHT11 VCC
ESP32 3.3V
DHT11 GND
ESP32 GND
DHT11 DATA
GPIO 32
Built-in Display Connections
TFT Display
Built into CrowPanel
Resistive Touch
Built into CrowPanel
Programming
USB cable to computer
CrowPanel ESP32 3.5 SPI TFT Display setup with DHT11

Actual setup of the CrowPanel ESP32 3.5 SPI TFT Display with DHT11 sensor.

Important: If using a bare DHT11 sensor, add a 10K pull-up resistor between the DATA pin and VCC. The CrowPanel display already includes the TFT display and resistive touch interface, so no separate display wiring is required.

Assembly Instructions

1

Connect Sensor Power

Connect the DHT11 VCC pin to the 3.3V pin of the ESP32.

2

Connect Sensor Ground

Connect the DHT11 GND pin to the GND pin of the ESP32.

3

Connect Sensor Data

Connect the DHT11 DATA pin to GPIO 32 of the ESP32.

4

Connect the CrowPanel

Connect the CrowPanel 3.5" HMI ESP32 Display to the computer using a USB cable.

5

Upload the Arduino Sketch

Upload the Arduino sketch using the correct board settings. After uploading, the LVGL environmental monitoring dashboard should appear on the display.

Software Setup

Download, Libraries, and Configuration

Before continuing, download or clone the project repository because it contains the required Arduino code, LVGL UI files, and project configuration used in this tutorial.

Project Repository: github.com/createlabz/crowpanel-3.5-hmi-esp32-spi-environment-dashboard
Repository note: This repository is required because it contains the complete code and UI files for this project. After downloading it, you may follow the tutorial steps to install the required libraries, configure the board, upload the sketch, and modify the dashboard based on your application.
1

Download the Repository

Open the repository, click the Code button, select Download ZIP, and extract the ZIP file on your computer.

2

Open the Arduino Project

Open the Arduino project file from the extracted repository using Arduino IDE.

Tested Software Versions
Arduino IDE
2.3.7
ESP32 Board Package
2.0.17
LVGL
8.3.11
TFT_eSPI
2.5.43
DHT Sensor Library
Latest Version
Board Settings
Board
ESP32 Dev Module
Flash Frequency
80 MHz
Upload Speed
921600
PSRAM
Enabled

Required Libraries

Install LVGL version 8.3.11, TFT_eSPI version 2.5.43, DHT Sensor Library by Adafruit, and Adafruit Unified Sensor Library using the Arduino Library Manager. The provided LVGL source reference is github.com/createlabz/lvgl.

TFT_eSPI configuration: Open Arduino/libraries/TFT_eSPI/User_Setup_Select.h and enable the configuration that matches the CrowPanel 3.5" SPI display. Incorrect configuration may cause a white screen, incorrect colors, display initialization failure, or touch issues.

Code and Configuration Snippets

The complete project code is available in the project repository. The key configuration snippets below are included because they are important for touch calibration, LVGL frame buffer allocation, and Bluetooth output.

Touch Calibration Values
uint16_t calData[5] = {292, 3607, 302, 3486, 7};
tft.setTouch(calData);
The tft.setTouch(calData); function applies the resistive touch calibration values so the touch coordinates match the screen properly.
LVGL Frame Buffer Allocation in PSRAM
buf1 = (lv_color_t *)heap_caps_malloc(
    screenWidth * screenHeight * sizeof(lv_color_t),
    MALLOC_CAP_SPIRAM
);
The frame buffer allows LVGL to render the interface more smoothly. If PSRAM is not enabled or the allocation fails, the program may show: PSRAM allocation failed!
Example Bluetooth Output
Temp:29C  Hum:65%

Bluetooth Serial Setup

Bluetooth Serial Setup
Bluetooth Device Name
CrowPanel_Control
Compatible Tools
Android Bluetooth terminal apps, PC Bluetooth Serial tools, Bluetooth SPP terminal
Sensor Update Interval
Approximately every 2 seconds
Bluetooth Commands
ON
Turn screen backlight ON
OFF
Turn screen backlight OFF
Backlight Pin
GPIO 27

Code Breakdown / Configuration Breakdown

The code initializes the display, touch interface, LVGL graphics engine, DHT11 sensor, Bluetooth Serial, LVGL frame buffer, timer interrupt, and dashboard UI. It then reads and sends temperature and humidity values every 2 seconds.

lv_demo_widgets()

Loads the LVGL Widgets Demo UI, which serves as the base interface for the environmental monitoring dashboard.

tft.setTouch(calData)

Applies the resistive touch calibration values so the touch coordinates match the display correctly.

lv_tick_inc(1)

Updates the LVGL tick timer so the interface can refresh and respond properly.

heap_caps_malloc()

Allocates memory from PSRAM for the LVGL frame buffer, helping the interface render more smoothly.

Bluetooth Serial

Sends sensor readings wirelessly and receives ON/OFF commands for controlling the screen backlight.

DHT Sensor Readings

Reads temperature and humidity data from the DHT11 sensor and updates the dashboard values.

General Program Workflow

  • Initialize Serial communication.
  • Initialize Bluetooth Serial.
  • Start the DHT11 sensor.
  • Initialize the TFT display using TFT_eSPI.
  • Initialize the LVGL graphics engine.
  • Allocate the LVGL frame buffer in PSRAM.
  • Start the LVGL timer interrupt.
  • Load the LVGL widgets demo UI.
  • Read temperature and humidity every 2 seconds.
  • Send sensor data through Bluetooth.

Documentation / Output Guide

After uploading the sketch, the LVGL environmental monitoring dashboard should appear on the CrowPanel display. The DHT11 readings should update approximately every 2 seconds and can also be viewed through Bluetooth Serial.

Expected Output / Behavior
Dashboard Display
Temperature and humidity values appear on the LVGL dashboard.
Bluetooth Output
Sensor readings are sent through Bluetooth Serial, such as Temp:29C Hum:65%.
ON Command
Turns the screen backlight ON.
OFF Command
Turns the screen backlight OFF.

Video Demonstration

The testing video shows the project demonstration. The viewer should observe the CrowPanel dashboard running and displaying the environmental monitoring interface.

Testing Video Reference: YouTube Shorts testing video.
Watch on YouTube

Conclusion

This project demonstrates how to build an Environmental Monitoring Dashboard using the CrowPanel 3.5" HMI ESP32 Display, LVGL, TFT_eSPI, DHT11 sensor, and Bluetooth Serial. The project successfully reads temperature and humidity values, displays them on an LVGL dashboard, and sends the readings through Bluetooth Serial. It also allows the screen backlight to be controlled remotely using Bluetooth commands.

This project can be improved by adding air quality sensors such as MQ135, BME680, or SGP30, WiFi cloud monitoring, MQTT support, SD card data logging, a mobile monitoring application, historical temperature and humidity charts, warning indicators, and custom LVGL widgets.

Temperature Monitoring Humidity Monitoring Bluetooth Serial Backlight Control MQ135 BME680 SGP30 MQTT SD Card Logging Mobile App Historical Charts Custom LVGL Widgets

References

These are the websites and documentation sources used as references. They are listed as names or plain website addresses only.

Arduino
Espressif Systems
LVGL Documentation
TFT_eSPI by Bodmer
Adafruit DHT Sensor Library
Adafruit Unified Sensor Library
Elecrow CrowPanel Documentation
CreateLabz GitHub Repository
CreateLabz CrowPanel 3.5 HMI ESP32 Environment Dashboard Repository
LucidApp
github.com/createlabz/crowpanel-3.5-hmi-esp32-spi-environment-dashboard
github.com/createlabz/lvgl
youtube.com/shorts/-G3fhEvk6ik?feature=share
CrowpanelCrowpanel 3.5 hmi esp32Embedded systemsEnvironmental monitoringEsp32 dashboardEsp32 displayHmi displayIot dashboardLvglTouchscreen ui

Leave a comment

All comments are moderated before being published