Using different displays.
Some displays have code builtin to lvgl (see the first post in this topic for use of st7789) - the need code to send a command (with data) and data to the display. I didn't need to modify the lvgl lv_delay code here as I use FC delays for initialising the display.
The ili9488 isn't supported - so needs a 'flush' to send data to a specified 'window' and an initialisation routine. I've used my own here - the board uses A0..A15 to send parallel data.
lvgl supports multiple displays (the actual hardware) not to be confused with screens (what is displayed - I demonstrate this with the keyboard)
Displaying a jpg is as simple as:
Code: Select all
lv_obj_t * img1;
img1 = lv_img_create(lv_scr_act());
lv_obj_align(img1, LV_IMAGE_ALIGN_CENTER, 0, 0);
lv_img_set_src(img1, "A:/storage/wrens3.jpg");
Code: Select all
littlefs_create_partition_image(storage D:/Projects/Flowcode/Images FLASH_IN_PROJECT)
I didn't get the littlefs support working correctly (and use stdio commands to access the files) - might need some more playing..
Touch works well - for example I tried the bar with a user adjustable position and the calendar widget.
I've barely scratched the surface of lvgl here - there a huge range of styles and widgets - and I have only combined a few (for example a label, roller and button for the initial screen) Have fun!
Ben - how do you turn off the (superbright) LED on the back of the board?
Martin