LittleVGL on Teensy

Hi all!
I'm starting to berate myself for deciding to check out this library.
I have never had so much sex!
Why are you posting unadapted stuff?
There are 90% of people here who need working examples and have neither the time nor the brains, but I am just like that.
I am using Teensyduino version 1.57 + Teensy4.0
Please give a working adapted library!
 
Hi all!
I'm starting to berate myself for deciding to check out this library.
I have never had so much sex!
Why are you posting unadapted stuff?
There are 90% of people here who need working examples and have neither the time nor the brains, but I am just like that.
I am using Teensyduino version 1.57 + Teensy4.0
Please give a working adapted library!

Maybe I am missing something? @skpang and @prickle posted over two years ago, that they did for their own projects. Which is great.

I personally have not tried it yet. But does remind me to look at @prickle did in his/her version of ILI9341_t3n as if appropriate, I will add to mine
Or better yet a PR, although again over two years ago.

But if you are really wanting someone to help you here, it might help if you specified a bit more information, like:
What display are you trying to use? What version of littleVGL? It looks like the first one was an older one and the 2nd was newer but probably other versions
have been released since then. And what have you tried?
 
I'd like to be able to use the library at all, with a Teensy 4.1. Can't find good instructions on how to do it. It's easy to download the SW, but I haven't seen good explanations of editing the configuration files and stuff. I would use a 3.2" ILI9341 and a Teensy 4.1 to start. My Electronic Lead Screw for my lathe works, but it sure could use some love in the UI department. I have the display working, but it needs work to be a little more polished. Last time I attempted LVGL installation I got nowhere. I didn't even understand their instructions! Is there a LVGL installation for Teensy4.1 for dummies?
 
I'd like to be able to use the library at all, with a Teensy 4.1. Can't find good instructions on how to do it. It's easy to download the SW, but I haven't seen good explanations of editing the configuration files and stuff. I would use a 3.2" ILI9341 and a Teensy 4.1 to start. My Electronic Lead Screw for my lathe works, but it sure could use some love in the UI department. I have the display working, but it needs work to be a little more polished. Last time I attempted LVGL installation I got nowhere. I didn't even understand their instructions! Is there a LVGL installation for Teensy4.1 for dummies?

Hi,

I have some examples which shows how to combine LVGL with my ILI9341_T4 library. In particular, there are some instructions in this example or this one on how to install/use LVGL Hopefully, it should not be difficult to adapt the code to use the screen driver of your choice if you prefer.
 
Maybe I am missing something? @skpang and @prickle posted over two years ago, that they did for their own projects. Which is great.

I personally have not tried it yet. But does remind me to look at @prickle did in his/her version of ILI9341_t3n as if appropriate, I will add to mine
Or better yet a PR, although again over two years ago.

But if you are really wanting someone to help you here, it might help if you specified a bit more information, like:
What display are you trying to use? What version of littleVGL? It looks like the first one was an older one and the 2nd was newer but probably other versions
have been released since then. And what have you tried?

Hello!
I am using Teensy 4.0, 4.1 + ILI9341 screen + ILI9341_T4-main library
All examples from this library except lvgl_touch_minimal and lvgl_music_demo compile and work fine.

also tried to install different versions of lvgl-8.2.0 library and latest one
 
Hello!
I am using Teensy 4.0, 4.1 + ILI9341 screen + ILI9341_T4-main library
All examples from this library except lvgl_touch_minimal and lvgl_music_demo compile and work fine.

Hi,

I am the author of the ILI9341_T4 library. Can you tell me more about the problem you encounter with the LVGL examples ? Did you follow the steps described on the examples to install LVGL and connect the screen or did you use a custom installation ? It is a compilation problem ? Normally the library should work fine with LVGL 8.2 (the last version I tested). If you tell me more about your settings, I can try to reproduce the problem and see if I can help..
 
C:\Users\.....\Documents\Arduino\libraries\ILI9341_T4-main\examples\lvgl_music_demo\src\music\lv_demo_music_list.c:59:19: error: 'lv_font_montserrat_12' undeclared (first use in this function)
font_small = &lv_font_montserrat_12;
^
C:\Users\.....\Documents\Arduino\libraries\ILI9341_T4-main\examples\lvgl_music_demo\src\music\lv_demo_music_list.c:59:19: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\......\Documents\Arduino\libraries\ILI9341_T4-main\examples\lvgl_music_demo\src\music\lv_demo_music_list.c:60:20: error: 'lv_font_montserrat_16' undeclared (first use in this function)
font_medium = &lv_font_montserrat_16;
^
Несколько библиотек найдено для "lvgl.h"
Используется: C:\Users\......\Documents\Arduino\libraries\lvgl-8.2.0
Не используется: C:\Users\.....\Documents\Arduino\libraries\lv_arduino-master
Ошибка компиляции для платы Teensy 4.0.

You can just create a library so that we all lose the dance with a tambourine?
 
Last edited:
Ok, I think I see the problem: the music player demo fonts are not loaded by default...

Edit lv_conf.h located at the root of the arduino /library folder (the same file you already edited) and change the define at lines 330-332 to

Code:
#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_16 1

... and hopefully it should work :)

Remark: All these instructions are already written at the top lvgl_music_demo.ino file...
 
Last edited:
/*Montserrat fonts with ASCII range and some symbols using bpp = 4
*https://fonts.google.com/specimen/Montserrat*/
#define LV_FONT_MONTSERRAT_8 0
#define LV_FONT_MONTSERRAT_10 0
#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_16 1
#define LV_FONT_MONTSERRAT_18 0

_FONT_ine 1 not in the edited file,
only visible here if translator is enabled
 
Last edited:
Hi,

I have some examples which shows how to combine LVGL with my ILI9341_T4 library. In particular, there are some instructions in this example or this one on how to install/use LVGL Hopefully, it should not be difficult to adapt the code to use the screen driver of your choice if you prefer.

Thank you. I will give it a try. Once my PCBs arrive I can build up a separate unit to do testing using lvgl and your library. Afterwards, I will see about using ili9341_t3n. My experience with using flying leads tells me that using a PCB is a much better and more reliable way to go!
 
Time limit to edit post exceeded, grumble. Wish it would tell me before I started an edit...

Got your library updated, made changes you recommended to lvgl and was able to compile the music demo. Thanks. Hope to try it out soon.
 
I just updated the example in the library to work with LVGL's latest version (the main branch on github).

I just tested it from a freshly installed Windows 10 (64 bits) machine and followed the steps:

  1. Installed Arduino 1.8.19 with default options.
  2. Installed Teensyduino 1.57 with default options.
  3. Downloaded file https://github.com/lvgl/lvgl/archive/refs/heads/master.zip and extracted it into "...\Documents\Arduino\libraries\" folder.
  4. Downloaded file https://github.com/vindar/ILI9341_T4/archive/refs/heads/main.zip and extracted it into "...\Documents\Arduino\libraries\" folder.
  5. Copied and renamed file '...\Documents\Arduino\libraries\lvgl-master\lv_conf_template.h' to '...\Documents\Arduino\libraries\lv_conf.h' (the base library folder).
  6. Edited file '...\Documents\Arduino\libraries\lv_conf.h' with the following changes:
    • [line 15] #if 1
    • [line 76] #define LV_TICK_CUSTOM 1
    • [line 256] #define LV_USE_PERF_MONITOR 1
    • [line 348] #define LV_FONT_MONTSERRAT_12 1
    • [line 349] #define LV_FONT_MONTSERRAT_14 1
    • [line 350] #define LV_FONT_MONTSERRAT_16 1
  7. Set hardware: Teensy 4.1 with the following wiring from the ILI9341 screen:
    • SCK to Teensy pin 13
    • SDO (MISO) to Teensy pin 12
    • SDI (MOSI) to Teensy pin 11
    • DC to Teensy pin 10
    • CS to Teensy pin 9
    • RESET to Teensy pin 6
    • VCC and LED to +5V, GND to ground
  8. Opened Arduino IDE and loaded example: [File]->[Examples]->[ILI9341_T4]->[lvgl_music_demo]. The example compiled and uploaded without trouble.
  9. Loaded [lvgl_minimal_touch] example. Set additional wiring:
    • T_CLK to Teensy pin 13
    • T_CS to Teesny pin 4
    • T_DIN to Teensy pin 11
    • T_DO to Teensy pin 12
    • T_IRQ to Teensy pin 3
    The example compiled and uploaded without trouble again.

Hopefully someone will find this guide useful !


Thank you. I will give it a try. Once my PCBs arrive I can build up a separate unit to do testing using lvgl and your library. Afterwards, I will see about using ili9341_t3n. My experience with using flying leads tells me that using a PCB is a much better and more reliable way to go!

Yes, using a PCB enables setting higher SPI speed. However, I just tried the instructions above on a breadboard with 20cm wires and it worked well at 40Mhz (and doing shameless self promotion I should add that my ILI9341_T4 library at 40Mhz will give you over 60 FPS easily with LVGL as shown in this video :p).
 
By any chance, can one have a git repo inside of the Arduino libraries folder? It would be nice for maintaining libraries from third parties. Does V1.8.19 get confused by that?
Otherwise, it's updating the local repo, then deleting the old lib in Arduino, then copying stuff over... Is there an easier way?
 
Безымянный2.png
Now this error
 
By any chance, can one have a git repo inside of the Arduino libraries folder? It would be nice for maintaining libraries from third parties. Does V1.8.19 get confused by that?
Otherwise, it's updating the local repo, then deleting the old lib in Arduino, then copying stuff over... Is there an easier way?

I put the git clone into the libraries folder of my Arduino sketches folder (i.e. as if I'd installed a third-party library). All being well, the Arduino magic should then use it in preference to the one installed by Teensyduino, even if you subsequently update. If you're in the habit of using branches then you can always check out the "master" branch to switch back to (something close to) the standard Teensyduino library. I also use TortoiseGit which saves quite a lot of remembering git command syntax.

Another way of quickly switching back to a Teensyduino library is to move the whole library folder to somewhere the IDE won't pick it up: I use an "ignored-libraries" folder, still within the sketches folder.
 
Thanks, it worked!
But it was a lot of sex!
If you publish for TEENSY 4/4.+ ILI9341_T41 then next time prepare the library so that you plug and play!
 
Getting any answer would be much more likely with a few more clues !! What error is reported ?? What files are you moving ?? What folder/path works & what folder/path doesn't work ?? Make sure to take a look at the forum rule stated at the top of the page. Help us to help you !!

Mark J Culross
KD5RXT
 
As soon as I save the project to another folder, it stops compiling.
What am I doing wrong?

If you are talking about the lvl music player demo, then you must also copy the /src subdirectory of the example and all it's content to the new location obviously...
 
Thank you! that's how it compiles.
I want to try also LVGL_Arduino.
What else should I do?
- I renamed #include "lv_demos.h"
- configured display driver
- moved all files to the sketch folder
after compiling this error;
LVGL_Arduino: In function 'void my_disp_flush(lv_disp_drv_t*, const lv_area_t*, lv_color_t*)':
LVGL_Arduino:47: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'startWrite'
LVGL_Arduino:48: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'setAddrWindow'
LVGL_Arduino:49: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'pushColors'
LVGL_Arduino:50: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'endWrite'
LVGL_Arduino: In function 'void my_touchpad_read(lv_indev_drv_t*, lv_indev_data_t*)':
LVGL_Arduino:60: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'getTouch'
LVGL_Arduino: In function 'void setup()':
LVGL_Arduino:105: error: 'class ILI9341_T4::ILI9341Driver' has no member named 'setTouch'
LVGL_Arduino:138: error: 'lv_demo_widgets' was not declared in this scope
'class ILI9341_T4::ILI9341Driver' has no member named 'startWrite'
 
Back
Top