Getting Started with LVGL Using ESP32 and ESP-IDF Framework
ฝัง
- เผยแพร่เมื่อ 27 ม.ค. 2024
- Get your PCB for 5$ from PCBWay 👉www.pcbway.com
-----------------------------------------------------------------------------------------------------
Code Repository Link:
github.com/xpress-embedo/ESP32
Project Path Inside Repository:
github.com/xpress-embedo/ESP3...
This project is based on ESP-IDF Framework, if you are interested in Arduino a project, it is available under the following path.
embeddedlaboratory.blogspot.c...
Video Tutorial of the Project
• Using LVGL to Display ...
-----------------------------------------------------------------------------------------------------
Arduino UNO: amzn.to/3901Dpw
Arduino Mega: amzn.to/2UgwA4j
ESP8266 Module: amzn.to/2S6EtGT
ESP32: amzn.to/36MEB3R
PIC Development Board: amzn.to/31exiAK
ARM Development Board: amzn.to/2S36wqO
OLED Display: amzn.to/36KIeXR
TFT Display: amzn.to/2RJgNte
Books:
Arduino: amzn.to/2RLkjmY
PIC: amzn.to/38T5uob
STM32: amzn.to/31cdeit
Blog Link:
embeddedlaboratory.blogspot.com
TH-cam Channel:
/ embeddedlaboratory
Facebook Page:
/ embeddedlaboratory
Email Id:
laboratory.embedded@gmail.com
Skype ID:
embedded.laboratory
I followed your video and the display just flickers a little. I'm using an ESP WROOM 32 board and a 2.8" SPI TFT Module. both the controller and display work with other examples. I compiled with both 5.2 and 4.4.6 esp-idf and lvgl version 8.3.11 and 9.0.0 without success. I have wired the SPI as shown in tft.h except for TFT_PIN_DC which is wired to GPIO_NUM_4 instead of GPIO_NUM_0 (there is no 0 on this board). I was hoping you might have a suggestion? Thanks in advance for any help.
As mentioned in the video also, first try to understand where the problem is.
Start with ILI9341 drivers, try to display a pixel or fill the screen, and then see if this is working.
The next step is to make the touch work.
Then comes the LVGL integration part.
My project only supports ILI9341 and LVGL 8.3.11.
If you really want to learn, follow the small steps I have mentioned, it will take time, but the output and learning will be worth it.
hello, im struggling to get the touch part to work. i am using arduino ide and lvgl there. the displaying of the ui works fine, but the touch for lvgl doesnt get detected. the touch is working, just not with lvgl. i went and checked the code, and my guess is that the my_touchpad_read function isnt being called. can you try and help me out? This is very frustrating, and i would like to finally be able to use this tool. I am using the demo code, but i just cant get the touch to work. I also added an extra function which is a simple if(getTouch){serial.print"bla bla"}, in the same code in the loop function, and if i touch, it detects the touch on serial, just lvgl is not processing it. am i missing something? do i need to add something to the standard my_touchpad_read function?
Please help :((
Please check the value of this macro "LV_INDEV_DEF_READ_PERIOD"
LVGL basically creates a timer that runs as per the period specified, u can add a print statement in your touch read function, and it should work.
If u have your code on Git Hub, u can share the link and I can try to check for mistakes.
The first step is to check whether the calling to you touch function is happening or not, and the next step is whether the touch is working.
Please check this link also, this project is based on Arduino
th-cam.com/video/RNACmN4dKWg/w-d-xo.html
hi, I am using Platformio esp-idf framework and ili9488 I am not sure am I successfully initialed the display driver may I know any way to identify it?
I don't have experience with platform io and esp idf framework.
This project is based on ili9341 controller.
I would suggest you to very step by step, first check if your display controller are working or not. You can set a color for a pixel or fill the screen with some color and then move to next step
@@EmbeddedLaboratory i am using the esp32 driver provided by lvgl the driver is hard to understand and cannot work also
I understand your pain, i also gone through this.
What I did was to use a Logic Analyzer and try debugging what exactly is happening.
And then I was able to make things running.
Even with ESP drivers, you can go inside the functions to understand what they are doing
@@EmbeddedLaboratory In the project I did not find any code control the display backlight?
@@EmbeddedLaboratory should I rewrite the SPI driver just like you since I did not understand what the lvgl provided code in GitHub it is so complicated
I'm beginner. What is ESP-IDF? is it the same as Arduino IDE?
Can I learn this tutorial by using Arduino IDE? I'm not very good at changing to new stuff.
You can search online this is very basic. ESP-IDF is IOT framework provide EspressIF, while Arduino has wrapper around EspressIf framework, and both has their IDE.
You can google for more information.
hi sir, I'm just using my laptop screen to take demo. can I use that?
Sorry I didn't understand what you are saying, can u please elaborate
@@EmbeddedLaboratory it shows lots of errors. C:/Espressif/frameworks/esp-idf-v5.1.2/components/lvgl/src/lv_api_map_v8.h:154:31: error: too many arguments to function 'lv_image_create'
154 | #define lv_img_create lv_image_create
| ^~~~~~~~~~~~~~~ why?
I don't know, but looks like you are for sure doing something wrong.
Try to send me all logs and then I can try to understand what is wrong.
You can also try LVGL forum.