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.
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.
- 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
- ESP32-WROOM32 LOLIN32 V1.0
- Product page: https://www.espressif.com/en/producttype/esp32-wroom-32
- Panel: MPI3501 (3.5inch RPi Display), 480x320 pixels
- Product page: https://www.lcdwiki.com/3.5inch_RPi_Display
- 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
- 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
- [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
- Tap 5 targets when prompted
- Values are persisted to NVS and mirrored to /spiffs/config.ini
- Device restarts after showing results
- Version is defined in main/version.h (e.g., 1.0.0)
- Logged at boot with build date/time
- MIT License © 2025 nicolas2k
- See LICENSE for full text
- Optional per-file header: /* SPDX-License-Identifier: MIT */
- Next version: bilingual (FR/EN) transcriptions on-screen and in docs