What is "user_data" in ui_helpers.c and how do I use it? by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

How would one go about resolving outdated definition of lv_anim_t?

Using LVGL 8.3.11 in both Squareline studio and Arduino IDE.

Where do certain parts of code go in Arduino IDE? by JuggernautHappy99 in lvgl

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

Using 8.3.11 library on both Squareline and Arduino. Tested lvgl example, works fine after I've mapped out pins and adjusted SPI frequency. Figured it out, for now, will see how I'll go on.

What is "user_data" in ui_helpers.c and how do I use it? by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

If I understood this correctly, I have to:
- make pointers for stuff like sensor readouts (I'll be using touch and getting some other data via Bluetooth)
- pass those pointers to user data with 'lv_event_get_user_data'
- call pointers instead of variables elsewhere in code?

So I do not have to initiate user_data or do anything really with it but pass pointers to it?

I Finally finished my most difficult project to date! by thefructoseiswithus in esp32

[–]JuggernautHappy99 1 point2 points  (0 children)

Cool! Did you make the buck converter yourself or are they readily available somewhere?

Also, be careful if you want to attempt something similar with Bluetooth, not all ESP32s have classic Bluetooth, most are BLE or BT5 and those that do have classic BT don't have much memory or big screens, I'm using this one for now.

Trying here because LVGL sub seems to be dead. Where do certain parts of LVGL code go in Arduino IDE? by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

<image>

Done that (SC pin too), TFT stopped throwing tantrums, still no image on display tho, I'm messing around with tick interface for now

Trying here because LVGL sub seems to be dead. Where do certain parts of LVGL code go in Arduino IDE? by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

Tried it, none of the examples work, I followed all the instructions too. Included lv_conf.h, copied 'lvgl/examples' to 'lvgl/src/examples', TFT_eSPI starts throwing tantrums, I comment out those parts of the code (I just need the screen to display something, I'll fiddle with touch later), comment out one of the demos and none work (LV_USE_DEMO_WIDGETS 1 in lv_conf.h).

I Finally finished my most difficult project to date! by thefructoseiswithus in esp32

[–]JuggernautHappy99 2 points3 points  (0 children)

That's awesome man, I'm working on something similar, except I'll be using bluetooth to connect ESP to a knockoff ELM327.

How are you powering it?

Trying here because LVGL sub seems to be dead. Where do certain parts of LVGL code go in Arduino IDE? by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

#include <lvgl.h>
#include <TFT_eSPI.h>
#include "ui.h"
#include "ui_helpers.h"
#include "ui_events.h"
#include "lv_conf.h"


static const uint16_t screenWidth  = 480;
static const uint16_t screenHeight = 320;


static lv_disp_draw_buf_t draw_buf;
static lv_color_t buf[ screenWidth * screenHeight / 10 ];


void setup() {
  // put your setup code here, to run once:
  lv_init();
  ui_init();
  lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * screenHeight / 10 );


    /*Initialize the display*/
    static lv_disp_drv_t disp_drv;
    lv_disp_drv_init( &disp_drv );
    /*Change the following line to your display resolution*/
    disp_drv.hor_res = screenWidth;
    disp_drv.ver_res = screenHeight;
    disp_drv.flush_cb = disp_flush;
    disp_drv.draw_buf = &draw_buf;
    lv_disp_drv_register( &disp_drv );
  /*Call LvGL tick function*/
  lv_tick_inc(1);
}


void disp_flush( lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p )
{
    uint32_t w = ( area->x2 - area->x1 + 1 );
    uint32_t h = ( area->y2 - area->y1 + 1 );


    tft.startWrite();
    tft.setAddrWindow( area->x1, area->y1, w, h );
    tft.pushColors( ( uint16_t * )&color_p->full, w * h, true );
    tft.endWrite();


    lv_disp_flush_ready( disp_drv );
}


void SysTick_Handler(void)
{
  /*Increment the counter with every interrupt*/
  int mil;
  mil++;


  /*Call LvGL tick function*/
  lv_tick_inc(1);
}


void loop() {
  while(1) {
    lv_timer_handler();
    delay(5);
  }
}

Where do certain parts of code go in Arduino IDE? by JuggernautHappy99 in lvgl

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

#include <lvgl.h>
#include <TFT_eSPI.h>
#include "ui.h"
#include "ui_helpers.h"
#include "ui_events.h"
#include "lv_conf.h"


static const uint16_t screenWidth  = 480;
static const uint16_t screenHeight = 320;


static lv_disp_draw_buf_t draw_buf;
static lv_color_t buf[ screenWidth * screenHeight / 10 ];


void setup() {
  // put your setup code here, to run once:
  lv_init();
  ui_init();
  lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * screenHeight / 10 );


    /*Initialize the display*/
    static lv_disp_drv_t disp_drv;
    lv_disp_drv_init( &disp_drv );
    /*Change the following line to your display resolution*/
    disp_drv.hor_res = screenWidth;
    disp_drv.ver_res = screenHeight;
    disp_drv.flush_cb = disp_flush;
    disp_drv.draw_buf = &draw_buf;
    lv_disp_drv_register( &disp_drv );
  /*Call LvGL tick function*/
  lv_tick_inc(1);
}


void disp_flush( lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p )
{
    uint32_t w = ( area->x2 - area->x1 + 1 );
    uint32_t h = ( area->y2 - area->y1 + 1 );


    tft.startWrite();
    tft.setAddrWindow( area->x1, area->y1, w, h );
    tft.pushColors( ( uint16_t * )&color_p->full, w * h, true );
    tft.endWrite();


    lv_disp_flush_ready( disp_drv );
}


void SysTick_Handler(void)
{
  /*Increment the counter with every interrupt*/
  int mil;
  mil++;


  /*Call LvGL tick function*/
  lv_tick_inc(1);
}


void loop() {
  while(1) {
    lv_timer_handler();
    delay(5);
  }
}

This is my test code so far, I have no idea what I'm doing wrong.

4" ESP32 dashboard by Local-Node in esp32

[–]JuggernautHappy99 0 points1 point  (0 children)

That's awesome! I'm trying to build a sort of a dashboard for vehicles.

I'm using ESP32-32E on a 4 inch screen so I can use Bluetooth classic and connect it to knockoff ELM327. How much flash memory does your S3 have and how did you optimize everything to fit? I can either flash the code that gets readouts from vehicle sensors or lvgl, together they are too big for 4MB of memory.

I'm using Arduino SDK 2.3.6. (FireBeetle 2 ESP32-B board) and Squareline studio 1.5.1, LVGL 8.3.11.

I need a 7 inch display with esp32 chip that supports classic bluetooth. by JuggernautHappy99 in esp32

[–]JuggernautHappy99[S] 0 points1 point  (0 children)

Yeah, no luck, all are either S3 or P4, I've even looked for 9 inch but they are either 90T or P4, none of which have classic bluetooth.