sra-board-component icon indicating copy to clipboard operation
sra-board-component copied to clipboard

Move from u8g2 library to lvgl library for OLED display.

Open gautam-dev-maker opened this issue 2 years ago • 19 comments

lvgl library seems more industry standard than u8g2 library. So we should rewrite all our OLED wrappers in lvgl library.

gautam-dev-maker avatar Jul 02 '22 10:07 gautam-dev-maker

@Jamm02 @ChinmayLonkar @Sidshx has anyone been assigned to take up this task? or should I assign one for this?

gautam-dev-maker avatar Aug 25 '22 17:08 gautam-dev-maker

Picked up the task. @Premraj02 will be accompanying me.

Sidshx avatar Aug 28 '22 18:08 Sidshx

@Sidshx any updates on the issue?

gautam-dev-maker avatar Sep 14 '22 10:09 gautam-dev-maker

Started referring resources on u8g2 and lvgl library and getting acquainted with the Wall-E codebase. Will be sharing an implemented work update soon.

Sidshx avatar Sep 15 '22 02:09 Sidshx

@Sidshx updates?

Jamm02 avatar Sep 21 '22 15:09 Jamm02

@Sidshx updates?

Imported and implemented the lvgl library, along with lvgl driver support for the esp-32. Configuration and hardware testing to be done at SRA tomorrow. Working with @Ayush-Kaura

Sidshx avatar Sep 25 '22 19:09 Sidshx

Share results of application of the firmware

Jamm02 avatar Sep 27 '22 03:09 Jamm02

Basic Hello World Code is flashed from examples of lvgl on esp32

Ayush-Kaura avatar Sep 27 '22 03:09 Ayush-Kaura

Bar for LSA Reading

Ayush-Kaura avatar Sep 30 '22 16:09 Ayush-Kaura

Sample Image Display

Ayush-Kaura avatar Oct 18 '22 05:10 Ayush-Kaura

the logo can still be made a bit smaller to fit in OLED

gautam-dev-maker avatar Oct 18 '22 06:10 gautam-dev-maker

@Ayush-Kaura With next update also issue the draft PR for review.

gautam-dev-maker avatar Oct 18 '22 11:10 gautam-dev-maker

Screenshot Using LVGL v8.3, master branch had some api changes Files Modified: lv_conf.h for setting lvgl related options inside LVGL folder, lvgl_helpers.c driver for ssd1306, oled.c and main.c inside src, CMakeLists Link will open draft pr after some of below work done: https://github.com/Ayush-Kaura/sra-board-component/tree/lvgl_port

To-Do

  • [ ] lvgl requires functions like lv_task_handler, lv_tick_inc
  • [ ] overall functions structure in oled.c (function parameters to be passed)
  • [ ] i2cdevlib for mpu and lvgl

Ayush-Kaura avatar Oct 27 '22 10:10 Ayush-Kaura

Screenshot Using LVGL v8.3, master branch had some api changes Files Modified: lv_conf.h for setting lvgl related options inside LVGL folder, lvgl_helpers.c driver for ssd1306, oled.c and main.c inside src, CMakeLists Link will open draft pr after some of below work done: https://github.com/Ayush-Kaura/sra-board-component/tree/lvgl_port

To-Do

  • [ ] lvgl requires functions like lv_task_handler, lv_tick_inc
  • [ ] overall functions structure in oled.c (function parameters to be passed)
  • [ ] i2cdevlib for mpu and lvgl

We are already using i2devlib. Just check the source code. :)

VedantParanjape avatar Oct 27 '22 11:10 VedantParanjape

@Ayush-Kaura I don't see the code used to display all these things in the fork.

VedantParanjape avatar Oct 27 '22 12:10 VedantParanjape

We are already using i2devlib. Just check the source code. :)

Sorry I meant using the same for lvgl driver as done for u8g2 previously, so that we can use both mpu and oled together.

@Ayush-Kaura I don't see the code used to display all these things in the fork.

Added, https://github.com/Ayush-Kaura/sra-board-component/blob/lvgl_port/src/oled.c

Ayush-Kaura avatar Oct 27 '22 13:10 Ayush-Kaura

We are already using i2devlib. Just check the source code. :)

Sorry I meant using the same for lvgl driver as done for u8g2 previously, so that we can use both mpu and oled together.

@Ayush-Kaura I don't see the code used to display all these things in the fork.

Added, https://github.com/Ayush-Kaura/sra-board-component/blob/lvgl_port/src/oled.c

Also include the updated examples/oled source.

VedantParanjape avatar Oct 27 '22 13:10 VedantParanjape

Also include the updated examples/oled source.

https://github.com/Ayush-Kaura/sra-board-component/blob/lvgl_port/examples/oled/main/main.c

https://user-images.githubusercontent.com/74896007/198845948-6b17e698-d57e-4b10-b9dc-6bd1905872fe.mp4

Ayush-Kaura avatar Oct 29 '22 17:10 Ayush-Kaura

As discussed do the following changes:

  • Use GLOB in CMakeLists.txt to add source files of LVGL instead of manually adding name of all files
  • use i2c_dev_lib and test with MPU6050 and OLED both together

gautam-dev-maker avatar Nov 05 '22 10:11 gautam-dev-maker