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
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.
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’
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!
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.
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);
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