• 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

Update uf config.h file

Q&A Forum › Update uf config.h file
0 Vote Up Vote Down
Helge Ruud asked 9 months ago

When updating the config.h file as rquired in the new vesion of the book, I get error message : Notice it worked fine before I moved demo and example files inside the scr file. What is wrong? When I did the same exercise the very first time with the first issue of the book all was OK.
c:\Users\hegru\Documents\Arduino\libraries\lvgl\src\examples\styles\lv_example_style_14.c:1:10: fatal error: ../../src/themes/lv_theme_private.h: No such file or directory
1 | #include “../../src/themes/lv_theme_private.h”
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1

7 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 9 months ago

Hello, there seems to be an issue with the current LVGL examples folder.

Can you please remove the LVGL library, then re-install it and do NOT move the examples/demos folders inside the src folder.

Then, try to re-compile the project. Does it work now?

I’ve just updated these instructions:

  • LVGL with ESP32 Cheap Yellow Display Board (ESP32-2432S028R) https://randomnerdtutorials.com/lvgl-cheap-yellow-display-esp32-2432s028r/

Let me know if this works for you.

0 Vote Up Vote Down
Helge Ruud answered 9 months ago

Tested with “Hello,World” and it worked fibe . Test with the more complicated one BMP temp and hum error message:
C:\Users\hegru\Documents\Arduino\sketch_aug26b_CYD_BMP_temp_hum\sketch_aug26b_CYD_BMP_temp_hum.ino: In function ‘void lv_create_main_gui()’:
C:\Users\hegru\Documents\Arduino\sketch_aug26b_CYD_BMP_temp_hum\sketch_aug26b_CYD_BMP_temp_hum.ino:178:48: error: cannot convert ‘lv_align_t’ to ‘lv_text_align_t’
178 | lv_obj_set_style_text_align(text_label_humi, LV_ALIGN_RIGHT_MID, 0);
| ^~~~~~~~~~~~~~~~~~
| |
| lv_align_t
In file included from c:\users\hegru\documents\arduino\libraries\lvgl\src/core/lv_obj_style.h:194,
from c:\users\hegru\documents\arduino\libraries\lvgl\src/core/lv_obj.h:27,
from c:\users\hegru\documents\arduino\libraries\lvgl\lvgl.h:39,
from c:\Users\hegru\Documents\Arduino\libraries\lvgl\src/lvgl.h:16,
from C:\Users\hegru\Documents\Arduino\sketch_aug26b_CYD_BMP_temp_hum\sketch_aug26b_CYD_BMP_temp_hum.ino:15:
c:\users\hegru\documents\arduino\libraries\lvgl\src/core/lv_obj_style_gen.h:834:66: note: initializing argument 2 of ‘void lv_obj_set_style_text_align(lv_obj_t*, lv_text_align_t, lv_style_selector_t)’
834 | void lv_obj_set_style_text_align(lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
| ~~~~~~~~~~~~~~~~^~~~~
C:\Users\hegru\Documents\Arduino\sketch_aug26b_CYD_BMP_temp_hum\sketch_aug26b_CYD_BMP_temp_hum.ino:186:52: error: cannot convert ‘lv_align_t’ to ‘lv_text_align_t’
186 | lv_obj_set_style_text_align(text_label_humidity, LV_ALIGN_RIGHT_MID, 0);
| ^~~~~~~~~~~~~~~~~~
| |
| lv_align_t
c:\users\hegru\documents\arduino\libraries\lvgl\src/core/lv_obj_style_gen.h:834:66: note: initializing argument 2 of ‘void lv_obj_set_style_text_align(lv_obj_t*, lv_text_align_t, lv_style_selector_t)’
834 | void lv_obj_set_style_text_align(lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
| ~~~~~~~~~~~~~~~~^~~~~
exit status 1
Compilation error: cannot convert ‘lv_align_t’ to ‘lv_text_align_t’

0 Vote Up Vote Down
Rui Santos Staff answered 9 months ago

It looks like you are using code from the previous eBook version.
The new code from that example doesn’t have that issue. Please use the code provided in page 181

Let me know if that works for you!

0 Vote Up Vote Down
Christian Lease answered 8 months ago

Hi. I was having the same original problem as the OP with the chapter 3.4 sketch from the 1.3 book version. It would not compile.
I removed and re-added the library and did not move example and demo as suggested, and that allowed it to compile and upload to the board.
But now the screen is a bunch of gibberish. The same happens for a sketch that ran fine last night. 
Are there any other version restrictions?
Thank you.

0 Vote Up Vote Down
Rui Santos Staff answered 8 months ago

Hello Christian,

Are you using the new code samples provided in the new eBook version 1.4?

The old code from eBook version 1.0, 1.1, and 1.2 no longer work under LVGL 9.2.

  • Until version 1.2 of the eBook, here were the settings:
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
touchscreen.setRotation(3);
  • After eBook version 1.3 and 1.4 with LVGL 9.2:
#define SCREEN_WIDTH 240
#define SCREEN_HEIGHT 320

In the setup()

touchscreen.setRotation(2);

NEEDS TO BE ADDED display rotation in the setup() after disp = lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));

lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);
0 Vote Up Vote Down
Christian Lease answered 8 months ago

Hi Rui. Thanks for the quick reply!
I was not aware that we were on to version 1.4 and was still using 1.3. The code is working fine with the 1.4 version!!
Christian

0 Vote Up Vote Down
Rui Santos Staff answered 8 months ago

Happy to hear that everything is working!
Regards,
Rui 

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.