Are there any higher level graphics libraries for Teensy that have widgets

clinker8

Well-known member
Been looking at making a GUI for my electronic lead screw project. Are there any libraries that folks know of that are a step up from the ILI9341_t3 sort of libraries? By that, I mean a little higher level. In what seems like a lifetime ago I made an application for a project that used wxPython. I believe that library was based on wxwidgets. Is there something like that around that works for Teensy 4.1? My development would be in Arduino 1.8.19 on Ubuntu 20.04.4 LTS.

I have found a few OS projects that almost get you there, but don't, like GUISlice Builder, which is incomplete, or emGUI, or lvgl.io. GUISlice Builder is missing the necessary header files, is really clunky, is a CPU hog on my laptop, but lets you see what the display would look like. emGUI looks abandoned, and lvgl.io doesn't make it easy to even figure out what you need to do to get it to work at all. However, on Arduino there is a lvgl library. Has anyone got that library to run on Teensy 4.x? The library install looks like it only gets you part way there, and you have to make mods to use it, according to https://docs.lvgl.io/latest/en/html/get-started/arduino.html

My notional design has several pages of displays, so it would be good to make it a little easier. I did it the old fashioned way on my last project and it really was painful, and not particularly good looking. It worked, but I'd like a more polished display for my electronic lead screw. If anyone has some insight into this, I'd appreciate it.
 
How about using a Nextion?
You design your screen offline on an editor. Then send it to the Nextion display.
The display just sits there until you send data to it.
Basically it's a display with it's own intelligence. You send it data and it displays that
data in whatever manner you told it to when you designed the screen.
I am using one (two actually) on a central heating controller.
You communicate with the Nextion over the serial ports.
I have written a Skeletal library for communicating with the Nextion which I will
be publishing very soon.
Have a look at the link I provided above.
 
I have LVGL working on the Teensy 4.1, and whilst it is a little bit of an initial learning curve, it is quite powerful and very flexible, and is actively maintained by the devs. I'd definitely recommend it. Plus, I don't use the LV_ARDUINO version, but the main version, currently at 8.2.0
 
I have LVGL working on the Teensy 4.1, and whilst it is a little bit of an initial learning curve, it is quite powerful and very flexible, and is actively maintained by the devs. I'd definitely recommend it. Plus, I don't use the LV_ARDUINO version, but the main version, currently at 8.2.0

How did you get that to work? I spent some time with it, but didn't get very far. Do you have any notes that you could share on getting it up and running? LOL it took me a day and a half to get an arbitrary text button to display correctly, and it isn't that professional looking.
 
LOL it took me a day and a half to get an arbitrary text button to display correctly, and it isn't that professional looking.

But isn't the battle with LVGL getting the initial setup installed, configured, working and tied in to your display driver to output to your screen? If you got to the point of displaying a text button, then surely you made it? It's now limited to your ability to design the screen?

I've been using LVGL through versions 6, 7 and now 8, so it's been a while since I started from scratch! I do find the code in the examples in the documentation, and also the demos on the home page, very instructional. Also, I know this may be more pain, but I did find that getting the Windows Code Blocks simulator up and running on my PC enabled me to more rapidly test out LVGL features.
 
But isn't the battle with LVGL getting the initial setup installed, configured, working and tied in to your display driver to output to your screen? If you got to the point of displaying a text button, then surely you made it? It's now limited to your ability to design the screen?

I've been using LVGL through versions 6, 7 and now 8, so it's been a while since I started from scratch! I do find the code in the examples in the documentation, and also the demos on the home page, very instructional. Also, I know this may be more pain, but I did find that getting the Windows Code Blocks simulator up and running on my PC enabled me to more rapidly test out LVGL features.
I know very little about LVGL, except for their fancy webpage. I never got it running. My comment on the button was coding it from scratch. I have not hooked up touch to it, but I can do that. This was a relatively trivial task. I want a few of the widgets that LVGL offers, that at the moment, I don't know how to implement. Was hoping for a moderately quick start to hacking things out. That hope has been crushed. I need to scroll through some settings and select them from the list. I could make something ugly that worked, but, I'd rather not.

I thought about installing Eclipse CDT, so I could at least see what LVGL could offer. Maybe I will. From my last time with Eclipse, it is easy to use once set up, but setting it up was awful. I think LVGL does give some hints for that installation, which should help. In the meantime, still prodding away at putting buttons and things in roughly the right place on the real screen. It's been a humbling experience, and more time consuming than I hoped for.
 
I never got it running. My comment on the button was coding it from scratch.

Ahhh, gotcha. Yes, there is no "quick start" for a combination of a "bare metal" device like the Teensy and a graphics library such as LVGL, which is capable of running on multiple platforms. The documentation should be enough to get you running though; I and a few others have managed this. It's hard to share a base project because the screen you use and the driver for the screen is so specific to each user. There are others on here that have used LVGL - what screen/driver did you use for your basic button project? Maybe some use that same driver and can provide a "skeleton" project to get you going?

Here is a quick YouTube video I put together where I quickly run through my "Lightning Trigger/Kitchen Sink" UI, to inspire you to keep at it. I'm not a UI designer at all, so I'm really limited by my design skills rather than the library. Almost all of the UI runs through LVGL; the exception being the full screen video, where I write the video directly to the screen buffer from the SD card. The scrolling graphs, video thumbnails and the audio visualizer are hybrid - they use the LVGL canvas widget, but the drawing is done by me.


This particular screen is an SSD1963 7" 800*480 with 16.7m colors, driven over 16 bit via GPIO. It can be configured to use an 8 and 9 bit interface too, and to also use FLEXIO. The project can also drive an NT35510 4" 800*480 with 65k colours over 8 and 16 bit GPIO or FLEXIO.
 
@beermat, very impressive. Umm, that's amazing. I'd say a parallel interface must make a huge difference. This SPI ili9341 is kind of a slow poke and it doesn't have all that many pixels to push.

What I'd like to be able to do is scroll through a list and select an item. This will allow me to load a row from a struct into my system for configuration. I could do it from an array of buttons, but that isn't very flexible, nor easily extensible. Your video is encouraging to me. Aspirational. Thanks for posting it.
 
There are a few supporting libraries for the ILI9341 developed by @KrisKasprzak
https://forum.pjrc.com/threads/69216-FREE-Menu-Library-for-ILI9341-Displays?highlight=menus

as for gauges and graphs you can check out his other library:
https://github.com/KrisKasprzak/ILI9341_t3_controls

https://www.youtube.com/watch?v=HE2Y7moK56A&t=37s

https://www.youtube.com/watch?v=YejRbIKe6e0

https://www.youtube.com/watch?v=U5hOU-xxQgk

The links to the associated libraries are in the descriptions of the videos
 
There are a few supporting libraries for the ILI9341 developed by @KrisKasprzak
https://forum.pjrc.com/threads/69216-FREE-Menu-Library-for-ILI9341-Displays?highlight=menus

as for gauges and graphs you can check out his other library:
https://github.com/KrisKasprzak/ILI9341_t3_controls

https://www.youtube.com/watch?v=HE2Y7moK56A&t=37s

https://www.youtube.com/watch?v=YejRbIKe6e0

https://www.youtube.com/watch?v=U5hOU-xxQgk

The links to the associated libraries are in the descriptions of the videos

Thanks for the lead to this. Think it is what I am looking for! It will be a great start for me to get my menus into my project.
 
Ahhh, gotcha. Yes, there is no "quick start" for a combination of a "bare metal" device like the Teensy and a graphics library such as LVGL, which is capable of running on multiple platforms. The documentation should be enough to get you running though; I and a few others have managed this. It's hard to share a base project because the screen you use and the driver for the screen is so specific to each user. There are others on here that have used LVGL - what screen/driver did you use for your basic button project? Maybe some use that same driver and can provide a "skeleton" project to get you going?

Here is a quick YouTube video I put together where I quickly run through my "Lightning Trigger/Kitchen Sink" UI, to inspire you to keep at it. I'm not a UI designer at all, so I'm really limited by my design skills rather than the library. Almost all of the UI runs through LVGL; the exception being the full screen video, where I write the video directly to the screen buffer from the SD card. The scrolling graphs, video thumbnails and the audio visualizer are hybrid - they use the LVGL canvas widget, but the drawing is done by me.


This particular screen is an SSD1963 7" 800*480 with 16.7m colors, driven over 16 bit via GPIO. It can be configured to use an 8 and 9 bit interface too, and to also use FLEXIO. The project can also drive an NT35510 4" 800*480 with 65k colours over 8 and 16 bit GPIO or FLEXIO.

Hi, I would like to know what you use to drive the display?
 
Back
Top