ESP32 Display 2.8-inch HMI MicroPython Tutorial

From Elecrow
Jump to navigation Jump to search

This tutorial will demonstrate how to program the ESP Terminal SPI via MicroPython.

The project of this tutorial is a smart light. When the ambient light intensity is lower than 60%, the LED will light up, otherwise, the LED will go out.

Hardware Preparation

ESP32 Display 2.8-inch Crowtail-Light Sensor Crowtail-LED USB-A(or USB-C) to USB-C cable 2* 4-Pin HY2.0 Cables
28-ecp32dispaly-mainpic.png Crowtail- Digital Light Sensor1.JPG Crowtail-LED1.JPG USB-C-CABLE.jpg CROWTAIL-CABLE.jpg
Get one now Get one now Get one now Get one now Get one now

Software Preparation

Download software

Go to and download the corresponding software version (take the Windows version as an example). Download-thonny.jpg

Double-click the downloaded exe file to install the software. (Go to the next step and install directly)

Download firmware

Open the Thonny software and click Tools→Options

Click "Interpreter" and select "MicroPython(ESP32)"

Select the serial port number (you need to press the hardware BOOT key and then connect to the computer, if no com number is displayed, check whether the serial port driver is installed)

Click "Install or update MicroPython(esptool)" to download the firmware

Choose to download the firmware from local and click Install (select the firmware corresponding to the screen)


Wait for successful installation
Micropython-tutorial-SP-firmware downloadingI.png

Run program

Click the reset button on the screen or reinsert the data cable to open the routine program.

Run the program

When the light intensity exceeds 60%, the light goes out. Light is on when the light intensity is less than 60%
Micropython-tutorial-SPI-result.png Micropython-tutorial-SPI-result1.png