I started to use LittlevGL on the ESP32 platform (using ESP-IDF with lv_port_esp32 as a submodule).
Is there a driver for lv_port_esp32 for the SSD1306 using I2C / TWI available?
Before starting to port a driver by myself I want to check whether there’s already a driver I can use?
I’ve a running code for the SSD1306 available which I can use. In one of the threads I found a discussion on the new API (branch new_api), but I’m not sure whether to use the new_api or not? Waht’s the difference?
Not yet, but I do have a display based on that controller laying around, so if you want we can work on adding it to the lv_port_esp32 repo, you “only” need to implement the init function and the flush function.
Reducing DISP_BUF_SIZE (e.g. /8) gives a performance decrease. I use ssd1306_set_px_cb to set the pixel. The buffer buf1 can then be send efficiently to the SSD1306.
Todo’s are
Cleanup Kconfig using predefined display settings and/or the WEMOS LOLIN Board
Check that SPI is not initialized
Code cleanup (included files, Kconfig defines, …)
It would be good if you could test with your board, too.
yes, I’m working with that board. Please find a (draft) screenshot in README.md. I’ll replace this in the next days with a more representative screenshot. See the link to my fork above, use branch ssd1306_add…
We should work on Kconfig. The predefined configuration is not working at least for me. If for example setting “M5Stack” everything is fine, but not because all relevant configuration is created. The #if CONFIG_LVGL_TFT_DISPLAY_CONTROLLER == TFT_CONTROLLER_ILI9341 is true because TFT_CONTROLLER_ILI9341 is 0 and so it’s always true. For other predefined configuration always ILI9341 is used.
When selecting not a predefined board but choose the display controller manually, it’s fine.
Do you want me to open a seperate ticket?
I can work on Kconfig - I thing the best way is to introduce some “helper” symbols. Using “select” is not working for me yet (see Kconfig stackoverflow. If we find a better solution later we can clean up in the future.
Just to let you know that yesterday and today I was able to test your work, had to clone the master branch and saw some improvements on the menuconfig, now the SPI related signals aren’t visible then choosing the SDA and SCL pin numbers .
Also noticed that the project isn’t using the demo project example, instead a Hello world! label and a line on the top left corner of the display, that’s a good choice because of the nature of the display I think.
I added a function on the ssd1306.c file to zero the oled memory after the initialization but I think that’s not necessary.
Also noticed you added a new board, the M5Stick
Thanks a lot for the work you’ve put on this, hope to see it available on the main repo soon
Hello Carlos,
I did some further work on the lv_port_esp32.
I needed to change back the sdkconfig and pin configuration. It’s not working properly for my toolchain in esp-idf 3.3.1, because when not adding a default value the assigned values are not correct, and when default values are used they’re included in every case. I need some mor time to work on this topic.
I split the main.c code to use the previous code for non-monochrome displays and to use a simple “Hello World!” for the small monochrome displays.
Yes, I added the 64x128 OLED display (probably it’s working for the 128x128 display, too, using the SH1107 display controller. They are used in the M5Stick (the little brother of M5Stack, but EOL) devices.
Updated rotation (landscape/portrait) for ssd1306 and sh1107 OLED displays, and made changes in Kconfig.
Update to Readme and some cleanup (indentation, …)
Also, I already used the code from branch “display_orientation” already, it’s working for my M5Stack.
And included the code to support mpi3501, commits up to 4/1/20 #8daaede.
I compared to the current master, and I’d provide a PR today.
Thanks for the PR, I have merged it, I will test it later today (I played a bit with your repo fork over the weekend), I agree the Kconfig files need more work. I have left some comments on the PR so we can plan further work on the monochrome support, if you don’t have time I can implement it, you’ve already done a lot of work.
Hi Carlos,
where can I find the comments you left on the PR? I have some time to continue working on that. Also, I could start working on “LVGL configuration” in https://github.com/littlevgl/lv_port_esp32/issues/93.
I tested the lvgl_kconfig branch, and added another option (LV_MEM) to it.
Is there any reason why we don’t put it in master yet? With this Kconfig configuration the lv_port_esp32 tree stays clean and doesn’t show any changes (“dirty”). (Besides the small thing of sdkconfig, which I would put in .gitignore, too)
I didn’t added it into master because I was trying to get all or most of the configuration options on it before making it available, we can add it to master, please send your PR.
Yes, I think we need to stop tracking the sdkconfig, I have already done that in another project and I didn’t had any issue.