00:00hello guys today i'm going to show you how we can build a custom user interface something like this
00:06using lvgl and our favorite arduino ide i'm using this esp32 c3 based smartwatch for the
00:13demonstration first of all you need to go to the official documentation for lvgl i will attach
00:17the link in the description now let's go to this widget section and do some experiments with with
00:24the button widgets here widgets means they have the fundamental building blocks for a graphical
00:29user interface or gui we built everything on top of widgets now they have provided different examples
00:36for different buttons see we have a push button we have a toggle button and we have buttons with
00:43animations and a lot now let's try to do some experiment with this kind of buttons now they
00:49have a preview as well as the court snippets for the same now let's make use of this court snippet
00:55and
00:56try to make this work so i'm copying this snippet provided by lvgl i've already prepared an arduino
01:03template for this project so you need to have all these three files in the same folder of the arduino
01:09code now let's open the arduino code so here you need to paste the snippet that we just copied from
01:16the documentation i modified the code so that when the toggle button is pressed that display background
01:22will turn to white and turn to black when the toggle is off let's upload this code and see it
01:28in action
01:28so now you can see that we have the two buttons like we saw in the preview we have this
01:34normal push
01:35button it has no action now when we hit this toggle button you can see that the background is turning
01:40to white now let me show you an application that i have built using the same technique now this is
01:45a torch
01:45it has a button on the middle clicking on which the torch light turns on and we have a brightness
01:51adjustment slider around this as well now i will attach the cord for this project as well in the
01:56description now do let me know what you'll be building with us in the comment section bye
Comments