MCUfriend library with LVGL for graphics

I've just started looking into MCUfriend graphics library to run on my Arduino Due with a 3.95 inch display and as i understand it, this is only a driver library and needs Adafruit_gfx for graphics. If this is true, is it possible to use LVGL for graphics instead of adafruit? If so, can someone please share some pointers on how to integrate these two libraries?

Adafruit_GFX is the accepted standard for most Arduino graphics.
It works very well.

MCUFRIEND_kbv inherits from Adafruit_GFX and Print classes.
Please post a link to LVGL. I know nothing about it. If this class uses the same API existing MCUFRIEND_kbv code would work.
But I would create a unique class name and inherit from LVGL.

Personally, I would advise you to stick with Adafruit_GFX i.e. like the rest of the civilised world.


Perfect. I now have something to start with.

Adafruit_gfx works well for small GUI projects however for more complex projects, I prefer a "design tool approach" which is available with LVGL EdgeLine
Link 1: LVGL Official Form.

Link 2: YouTube Demo

I've worked with TouchGFX & it works seamlessly and effortlessly with ST uControllers. Having something similar for Arduino boards can really help the community.

PS: I am aware of a brand called NEXTION which has all the features that I need however they seem to have mixed reviews from users and those displays are quite expensive compared to these $10 dumb displays.


Please post a link to this. I do not want to go on a wild goose chase.


I've updated previous comment updated with links to LVGL edgeline. Thanks

Ok, so the video shows some GUI editing software running on a PC.

I presume that it will generate code for calling LVGL methods. Or any set of GFX methods.

But without a link to LVGL documentation, class , code, ... it is a pointless exercise.

As I said earlier, I don't want to go on a wild goose chase.


Good morning David. Thanks for your help on other display topics. Here are some links to the lvgl documentation:

The porting guide is at: Porting — LVGL documentation

The ‘Getting Started’ guide for Arduino is at: Arduino — LVGL documentation

Now, for the Arduino, they assume we’ll be using TFT_eSPI - not AdaFruitGFX with MCUFriend_kbv. I’m working through their sample and trying to convert it to use AdaFruitGFX and MCUFriend_kbv - I haven’t succeeded yet, I get a hard crash when making the call to initialise the driver. There are some more things I can try before tearing my hair out - the library has build in logging and I can increase the level to see more of what’s going on. I’m not convinced I’ve configured it correctly to use the ssd1963 driver.

Why am I looking at this library? For one, it supports anti-aliasing, for another, it has a good set of inbuilt widgets/controls available:

There’s a simple Arduino sample “hello world” app at lvgl/LVGL_Arduino.ino at master · lvgl/lvgl · GitHub

I’ve got a question open on the lvgl forum about my problem, SSD1963, lv_disp_drv_register, getting started.....crash - Get started - LVGL Forum. In that code I call tft.println to display debug output on the screen using MCUFriend_kbv - that works. However, as mentioned earlier I get a hard crash initialising the driver. Oh well.

I hope that gives you the pointers to docs etc. that you were asking for.


The lvgl repo is here: LVGL · GitHub

I’ll be wandering through that to get some clues on solving my problem.

Thanks for the links. ianikrb seems to be a different member from prash85.

Since the LVGL links advise using TFT_eSPI on an ESP32, I suggest that prash85 does too ! TFT_eSPI supports most of the popular TFT controllers.

LVGL looks too "big" to run on a Uno.

Incidentally, TFT_eSPI implements most of Adafruit_GFX class methods independently.
MCUFRIEND_kbv inherits directly from Adafruit_GFX.
In practice most Arduino Adafruit_GFX sketches will run with both libraries with just constructor and begin() changes.
Obviously complex things like LVGL will encounter other differences.


Yes, we’re different people.

The help forum for TFT_eSPI says that the library doesn’t have a specific driver for the Nano, and that without one it will run too slowly for lvgl.

When I get chance, I’ll look to see what’s involved in producing a Nano specific driver - it might be easily adaptable from the ones already there, I might be being too optimistic.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.