Has Anyone Got 7inch Elecrow HMI and Squareline Studio To Work Together ?

Hi All,
I recently purchased 4 of these panels. (https://elecrow.com/esp32-display-7-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html)
I have managed to get the screen to display something using the LovyanGFX library but that's as far as i have got.
I have followed the online video tutorials on the process to integrate the HMI display with a UI from Squareline Studio but fail on every occasion to succeed.

Frustrated by the lack if clear instructions and constant failures, I am just wondering if anyone out there has achieved even the simplest of UI using Squareline and the displays i have purchased ? Can it be done ?
Please let me know if my quest is futile or if it can be done and i'm just stupid.

Thanks

Tagged:

Comments

  • Hello @BangingHeadBrickWall ,
    We're sorry that the video is out of date. Please try the demo below:

  • Thanks Elecrow
    One step forward, your demo code uploads to the screen and i have "successfully" done my own UI and loaded that up.
    However the touch part of the demo does not work, so it doesn't change screens.
    What touch driver should be used with ESP32 Display-7inch SKU:DIS08070H ?

  • Hello @BangingHeadBrickWall ,
    May I kindly ask have you modified the content in the loop function? Please do not modify the content in the loop function. This is the task processing function of LVGL, please make sure to run the timer handler every 5ms.

  • Hi Elecrow
    No I haven't modified the code in the loop function. The timer handler is as sent at 5ms.
    Whilst prototyping i am using the USB lead provided to power the display
    It appears the touch screen is working , i can get feedback from the screen touch on the serial monitor [data x: data y:] co-ordinates of screen touch and their range is consistent with the position on the screen.
    From that i presume that the UI is not registering (triggering) the screen touch event at the area of the button. Still looking into that .

  • Hi @BangingHeadBrickWall ,
    The button event is in ui.c, could you please send the screenshot of your code?

  • Hi
    Thanks Elecrow for your help.

    The problem of the screens not changing using your 7_inch_Squareline.ino file in post 2 has been located
    It was in the LV_Conf.h file and particularly
    1. #define LV_TICK_CUSTOM 1 this was set to _#define LV_TICK_CUSTOM 0

    1. /If using lvgl as ESP32 component/
      #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
      #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
      These just needed un-commenting :)

    This is now what my LV_Conf.h file looks like in respect of LV_Tick

    /Use a custom tick source that tells the elapsed time in milliseconds.
    *It removes the need to manually update the tick with lv_tick_inc())
    /

    define LV_TICK_CUSTOM 1

    if LV_TICK_CUSTOM

    //#define LV_TICK_CUSTOM_INCLUDE "Arduino.h"         /*Header for the system time function*/
    //#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())    /*Expression evaluating to current system time in ms*/
    /*If using lvgl as ESP32 component*/
    #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
    #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
    

    endif /LV_TICK_CUSTOM/

    Posted as it may help someone else struggling

Sign In or Register to comment.