Skip to content

1.28 inch Rotary Display — Arduino Course Index

This course is built around the Elecrow CrowPanel 1.28 inch Rotary Display (ESP32-S3, 240×240 IPS round touch knob screen). It uses the Arduino IDE with ESP32 Arduino Core 3.3.8, together with LVGL 9.1.0 and LovyanGFX.

The series starts from environment setup and serial output, then moves on to touch-button control, knob encoder dimming, DHT20 temperature and humidity sensing, UART communication with an external Wi-Fi module, and finally USB HID mouse emulation — 6 hands-on lessons plus 1 getting-started guide.

Code repository: github.com/Elecrow-RD/CrowPanel-1.28inch-HMI-ESP32-Rotary-Display-240-240-IPS-Round-Touch-Knob-Screen

Getting Started Guide

  • Arduino + LVGL Rotary Display Getting Started Guide A complete introduction from scratch: getting to know the 1.28 inch rotary display hardware, preparing the Arduino development environment, an overview of the LVGL graphics library and driver framework, and the learning path for the 6 lessons that follow. Read this before starting Lesson 01.

Lessons

  1. Lesson 01 · Print Hello World Serial output of the first message. Using the ESP32-S3 and Arduino Core 3.3.8, print Hello World once after startup and then repeat it roughly every 1 second. You will learn that setup() runs only once while loop() repeats continuously, and verify the output interval at 115200 baud.

  2. Lesson 02 · Turn on the LED Using a touchscreen button to control an LED. Based on the GC9A01 LCD, the CST816D touch controller, and a GPIO4 LED, clicking the LVGL button toggles GPIO4 and switches the label between LED ON and LED OFF. Covers initialization of the LCD SPI, touch I2C, display flush, and touch callbacks.

  3. Lesson 03 · Encoder Brightness Adjust the backlight with the knob and toggle the LED. GPIO45/GPIO42 are the encoder A/B phases, GPIO41 is the button, GPIO46 controls the backlight, and GPIO4 controls the LED. Each valid four-phase cycle changes the brightness by 5%, and pressing the button toggles the LED. Includes the four-phase state table and debouncing logic.

  4. Lesson 04 · Temperature and Humidity DHT20 temperature and humidity display. Read the DHT20 over I2C on GPIO38/GPIO39 at address 0x38, take a measurement every 2 seconds, and show the result on both the LCD and the serial port. Prints DHT20 read error if a reading fails.

  5. Lesson 05 · Serial Port Usage UART control of an external Wi-Fi module. ESP32 UART1 communicates with an ESP-AT-compatible module using TX43, RX44, and 115200 8N1. The program sends AT commands, configures Station mode, connects to Wi-Fi, queries the IP address, and displays the status on the LCD and serial monitor.

  6. Lesson 06 · USB 2.0 Simulating a USB HID mouse with a touchscreen. Using the ESP32-S3 native USB, the CST816D, and USBHIDMouse, touchscreen swipes become computer mouse movement, the left button stays pressed while touching, and it is released when the touch ends. USB-OTG (TinyUSB, ARDUINO_USB_MODE=0) must be selected.


Elecrow CrowPanel 1.28" HMI ESP32 Rotary Display · Arduino Course Index (v1)