#LVGL Touchscreen Project

23 messages ยท Page 1 of 1 (latest)

ashen belfry
#

This is my first project using the new LVGL component.

#

I have included my comments and tips on how to best plan and make an LVGL project.

lament fable
#

Wow, the length of that LVGL config file. Impressive!

ashen belfry
#

now u see why i broke up the yaml ๐Ÿ˜‰

lament fable
#

if that's broken up, i'd hate to see it originally! I suspect I'll be down that slippery slope before I know it!

ashen belfry
#

well my "main" config file got to about 1k lines then i realised i had done half of the homescreen only, so i stopped coding and broke it all up into the different yaml files

lament fable
#

good advice, I've only just discovered pulling code from github, having verison history is handy.

ashen belfry
#

also i have all the files open in split screens

#

this means when I make a new sensor in the sensor file on the other pane is the lvgl yaml to add the new label id etc from the sensor

#

in the end i made a list of all the sensors i needed then added them all and made the lvgl labels and put them all on a "holding page"

#

i did this cos it will not compile if u have a sensor without the label made

#

then as i was making the pages i would cut the label code out of the holding page and put it inplace

peak hatch
#

those are some intense colors! very cool looking though

#

Hmm, would it be possible to break the pages into their own yamls? I don't know enough about the various include/substitute options to say if importing array elements individually would work ๐Ÿค”

ashen belfry
#

into a pages file itself - yes - then into a yaml file per page? yes I think that should be possible

peak hatch
#

would you mind sharing an example? I think I'll want to do that as my lvgl stuff gets more complex

versed sparrow
#

I think if you provide the keys down to that point, you can use it as a package. I assume that will work because I don't see how it's any different than adding a sensor with a package.

flint storm
#

In my case I put the sensors that are only needed in a single page on that page's yaml though.
That way, if I want to reorder the pages, or e.g. disable a specific page, I only need to change the package include line

ashen belfry
#

also by doing it this way u can share the yaml between devices

#

I have used the same code over and again now on 3 different screen sizes and just tweaked font sizes etc for it to fit the smaller screen