• 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

LVGL user interface (objects) in separate file

Q&A Forum › Category: ESP32 › LVGL user interface (objects) in separate file
0 Vote Up Vote Down
Juan Ramon Lopez Velarde asked 3 months ago

I have a complex UI (User Interface) which includes several different screens, so it is a lot of code which complicates analyzing the code of my project.
How can I create the LVGL user interface in a different file and just include it and call its methods and objects to create and display them as necessary?
 

Question Tags: LVGL separate user interface from project code ESP32
4 Answers
0 Vote Up Vote Down
Mike Parsons answered 3 months ago

Not sure if I’ve picked you up right, but check this guy out. https://www.youtube.com/watch?v=HtYlQXt14zU

0 Vote Up Vote Down
Juan Ramon Lopez Velarde answered 3 months ago

Thanks Mike.   I saw that before, but that is just for general procedures/functions.   My problem comes with LVGL objects, as creating them in a separate file (with just procedures to create the user interface) makes them unaccesible to the main “.ino” file.
 
The files should be structured as follows:
   – Main “.ino” file with the core of the program (it includes the setup() and loop() procedures).
   – Extra file with procedures just to create the complex LVGL user interface.
 
From main file, I want to call/execute the procedures in the extra file, and then, from main file, be able to reference the LVGL objects created in the extra file and take some actions on them (buttons, sliders, whatever the user interface has).
Hope I explained myself.
 

0 Vote Up Vote Down
Mike Parsons answered 3 months ago

Ok, so you’re obviously well ahead of me. Sorry I was unable to help. Good luck with your project. I too have the LVGL book and I’m desperate to get started on it, but I have too many other things on the go just now.
All the best

0 Vote Up Vote Down
Juan Ramon Lopez Velarde answered 3 months ago

Thanks Mike.
Hope somebody else is able to help on this, as I think this is a common challenge for several people.

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.