Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nicolas2k/esp32_ili9486_dualcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                   MIT License

                          Copyright (c) 2025 nicolas2k

     Permission is hereby granted, free of charge, to any person obtaining a copy
     of this software and associated documentation files (the "Software"), to deal
     in the Software without restriction, including without limitation the rights
     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     copies of the Software, and to permit persons to whom the Software is
     furnished to do so, subject to the following conditions:

     The above copyright notice and this permission notice shall be included in all
     copies or substantial portions of the Software.

     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.

Driver ILI9486 + XPT2046 for ESP32-WROOM32 LOLIN32 V1.0 (Dual Core)

Firmware to drive a 480x320 ILI9486 LCD with an XPT2046 resistive touch controller on ESP32. Includes diagnostics, text/color tests, and a guided 5-point touch calibration with NVS persistence and optional INI mirroring.

Features

  • ILI9486 LCD driver and simple graphics primitives
  • XPT2046 touch driver with debounced tap processing
  • 5-point calibration (TL, TR, BL, BR, Center)
  • Stores calibration in NVS; mirrors to /spiffs/config.ini and prints it
  • Optional diagnostics: color bars, TV test pattern, text tests

Hardware reference

Project layout

  • main/
    • main.c: entry point, tests and calibration trigger
    • display.*: higher-level drawing and test screens
    • lcd_ili9486.*: LCD panel driver
    • lcd_graphics.*: primitives and text
    • touch.*: touch abstraction
    • touch_xpt2046.*: XPT2046 low-level SPI I/O
    • touch_calibration.*: calibration flow and persistence
    • config_storage.*: NVS persistence helpers
    • spiffs_data/config.ini: startup configuration copied to /spiffs

Build and flash (macOS)

  • Install ESP-IDF 5.5.x
  • In project root:
  • idf.py set-target esp32
  • idf.py build
  • idf.py -p /dev/tty.usbserial-XXX flash monitor

Configuration (spiffs_data/config.ini)

  • [display] screen_width=480, screen_height=320
  • force_calibration=1 forces calibration at next boot
  • touch_calibration_mode=1 enters guided calibration mode
  • After successful calibration:
  • [calibration] section is appended with x_min/x_max/y_min/y_max and flags
  • touch_calibration_mode is set to 0 and the updated file is printed

Calibration flow

  • Tap 5 targets when prompted
  • Values are persisted to NVS and mirrored to /spiffs/config.ini
  • Device restarts after showing results

Versioning

  • Version is defined in main/version.h (e.g., 1.0.0)
  • Logged at boot with build date/time

License

  • MIT License © 2025 nicolas2k
  • See LICENSE for full text
  • Optional per-file header: /* SPDX-License-Identifier: MIT */

Roadmap

  • Next version: bilingual (FR/EN) transcriptions on-screen and in docs

About

Driver ILI9486 + XPT2046 for ESP32-WROOM32 LOLIN32 V1.0 (Dual Core)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published