PROS LVGL 5.3 Guide

July 8, 2025

Banner image

Prelude

Note: This was made with LVGL 5.3 and PROS 3

This is a starter guide with some of the information I learned when making my GUI. This is meant to help you get started with your own, but isn’t a replacement for reading the documentation. That being said, here are some links that can help you get started faster:

I also recommend reading Team 81K’s tutorial, I don’t plan on repeating a large portion of the same information here that’s already in their tutorial.

Some Other Information

Table of Contents

(Coming Soon)

Designing your UI

If you plan on designing your UI in Canva, here’s what I reccomend.

  1. Design your UI with the brain’s screen size in mind. Your screen is likely 2-3x larger than the Vex Brain. Designing with that in mind will allow your buttons to not be too small, like mine were.
  2. Always resize your images to fit on your screen. I haven’t been able to figure out how to properly resize large images into ones that fit in how you want them to on the Brain. You can export resized Canva images by dragging a shape on top of your element, resizing it to fit inside of the image, and then making the color completely transparent. Then select both the image and the newly invisible element using Ctrl+Click, and then right click and press Download Selection.

Images

Image Converter: https://lvgl.io/tools/imageconverter (I believe you can select LVGL 8, or you can use https://lvgl.github.io/lv_img_conv/)

GIF-Pros: https://github.com/theol0403/gif-pros

Gif-Pros exists, which should in theory you to use GIFs from an SD card directly in PROS without conversion. I haven’t been able to get it working, but your mileage may vary. When you finish designing your UI, you need to translate all images into C arrays, and convert fonts into ones usable by LVGL. Use the Image Converter to convert images to C Arrays.

When you convert your image to a C array using imageconverter, you need to do a few things:

  1. Remove all spaces from your filename.
  2. Upload your Image
  3. Select CF_TRUE_COLOR or CF_TRUE_COLOR_ALPHA
  4. Select C Array as the output format
  5. Press the confirm button, then download your image.
  6. Open it in Visual Studio Code

On line 12, change #include "lvgl/lvgl.h"
image
to `#include “pros/apix.h”

Delete the two #ifndef statements following the pros/apix.h header.
image

Then delete the three LV_ATTRIBUTEs in the c array image map. image

The top portion of your image file should now look like this:
image

Custom Fonts

Font Converter: https://lvgl.io/tools/font_conv_v5_3

Use the following settings for normal (latin) characters:

All other options are up to you.

Change #include "lvgl/lvgl.h" to .h#include "pros/apix"

Starting out

PROS already ported and initalizes LVGL, so you can ignore those portions. A screen is already created when PROS starts, and you can retreve this screen using lv_scr_act(). You can also make your own screen using lv_obj_t* customScreen = lv_obj_create(NULL, NULL);

Custom Styles can be created using the following code:

static lv_style_t style_bg;
	lv_style_copy(&style_bg, &lv_style_plain);

and added to elements using the following line: lv_obj_set_style(object, style);