How to get startet as a complete newbie

I am a complete newbie to littlevGL. I also have only little experience with python / micropython. I know the best way is to start from the beginning and working thru. But I am more the learning by doing type and I have the best results learning a thing by working on a actual project. Now I want to learn how to connect a tft display to a ESP32 and have some simple buttons on it. I am working with Thonny IDE on a raspberry pi. It cant be so difficult to get the lvgl library to my project but I dont know how to do this. I read all the informations about “porting” and “binding” and so on but I dont understand it. It is very difficult to understand it as not being a native programmer. Can somebody explain the basics to me step by step? This would be very nice. Thank you in advance

Please excuse my very bad english

Greetings Uli

@amirgon Do we have a document which can be helpful here?

Hi @ruesti!

First - we have an online simulator!
Here is a simple Hello World example.

With the simulator you can start writing and running code immediately, no setup is needed.
It’s a good way to get to know lvgl and Micropython, without dealing with any hardware or firmware.

When you want to move to real hardware - it requires a bit more effort.
Today we don’t have a “newbies guide” or “walk-through”. We also don’t provide prebuilt binraies.
You will need to build the firmware yourself, upload it to the device, wire and configure your hardware etc.

Before trying lvgl+Micropython you should learn

  • How to build and deploy firmware for ESP32 using the Xtensa toolchain and ESP-IDF
  • How to build and deploy Micropython on ESP32

You can find a lot of stuff on the internet about these. When you master that, deploying and running lvgl in Micropython is much easier.

Assuming you would like to use ESP32 with IL9341 display, here are the steps you need to take:

  • Follow the instructions for Setting up the toolchain and ESP-IDF
  • Clone lv_micropython, build and deploy it according the instruction in the README
  • Connect to the ESP32 device through serial and make sure you get the Micropython REPL
  • Use some utility to upload scripts to ESP32 (for example ampy). Another option is to configure WIFI, start FTP server and upload files through FTP directly to the ESP32 flash. Actually there are a lot of ways, some people use Jupyter notebooks to run scripts on ESP32.
  • Upload and run your Micropython script.
    Your script should at least import lvgl and configure ili9341 driver according to the way you wired your hardware.

You can find some examples for lvgl Micropython scripts on the examples dir.

If you get stuck - don’t hesitate to ask for help here in the forum!

1 Like

Updated example (for v7):