• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

TFT Display – Calibrate only the first time (when it is energized for the first time)

Q&A Forum › Category: ESP32 › TFT Display – Calibrate only the first time (when it is energized for the first time)
0 Vote Up Vote Down
Juan Ramon Lopez Velarde asked 7 months ago

I am building a device with an ESP32 that incluldes a TFT Touch Screen which is intended to be built in series for multiple users.
I want to make sure that the first time the devide is energized, the calibration is performed for the TFT display, but the following times it is not (unless the user seems it is necessary).
How can I do that?
How can I know if it was already calibrated?
 

Question Tags: TFT Display One-Time Calibration
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
You can save the coeficients used for the calibration on variables on the ESP32 flash memory using Preferences.h.
When it loads a program, first it can check if there are any calibration coefficients saved. If not, it should run the calibration sketch. If there are already coeficients saved, it means the calibration was already performed.
To learn more about preferences: https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/
 
One of our readers created a sketch for the calibration that saves the coeficients on variables using Preferences.h.
His sketch was compatible with LVGL version 9.1. You can check his examples here: https://github.com/CF20852/ESP32-2432S028-Touchscreen-Calibration
 
I hope this helps.
 
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.