BB3-CM4 - CM4 compatible MCU board for BB3

At start of the 2023. NLnet decided to sponsor development of BB3-CM4.

Check more details here:

Almost last project goal goes first

Among other tasks needed for BB3 CM4 project we will need to have more LVGL platforms supported by Envox EEZ Studio.

LVGL is a free and open-source embedded graphic library with features that enable you need to create embedded GUIs with intuitive graphical elements, beautiful visual effects and a low memory footprint.

Recently Envox EEZ Studio ( got support for LVGL, they have supported STM32 and web platform, but because of chip shortages STM32 is really hard to get.

To get more people join creating amazing GUI interfaces we will need to add platform that is currently more available.

And what would be more interesting then to start with famous ESP32!

Adding LVGL ESP32

ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth.

So lets start!

LVGL already have working esp32 port, but it is still on v7.9

EEZ studio is using new LVGL version 8.3

Searching among forks I have found that catcatBlue did significant update up to version 8.2

So I have selected this repo as my starting point.

After few fixes I got demo working with version 8.3.

Not I just needed to get eez-framework to compile with ESP-IDF.

With big help from Martin, and few CMakeLists and sdkconfig changes we got first compiled version of eez-framework and LVGL 8.3 working!

So it was time for some LVGL GUI demo action.

ESP32 GUI demo

My BB3 is bit away from my working desk, and to adjust voltage/current or power on/off I always need to rise from desk and click on BB3 screen.

I could use USB controller - like pedal or I could even use controller over computer, but sometimes I do not want to power of my PC to just power on off channels.

So I have decided that first demo project should be WIFI BB3 touch controller.

BB3 already have SCPI over TCP implemented to it should be easy task.

With experimenting we have found lots of missing or not working things in GUI builder so Martin fixed those while I was working on the demo.

And after few days here is the result of my work:

There is still lots of place for improvement but I will leave that for someone else as I have just what I need.

Now I can check, change, switch channels from my working table.

Need for (more) screens!

After that demo I have visited Radiona and check what LCD are available there.

I was home with bunch of LCD-s. Few TFT, some ESP32 boards with OLED screens, and even few e-ink screens...

For e-inks I have found cale-idf libraries so I forked that one and did few changes to get LVGL 8.3 working.

And after day or two I got my first e-ink GUI from Studio working.

Radiona also had cool former e-radionca - now Soldered ( e-inks - called Inkplate so I decided to give those screens a chance.

And with adding just few changes I got all screens working.

There is still some minor issues with screens as some of them because chip shortages are without touch chip, but most of the work is done.

After my work was done Martin cleaned all the mess I made on repository and sorted files and samples, so I just transferred ownership to eez-open and now repo with all esp-idf samples is located here:

Even debugger for ESP32 works!

Exibition time

Soon after I finished Inkplate work Radiona announced that we have exhibition and it would be cool if we could add some interactive display to exhibition.

I have contacted Deborah, Paula and Damir, and together we agreed on project details.

First idea was to connect all screens and sync them to run same animation but on different parts of screen.

It was not so easy as I expected so we ended with only 2 e-ink screens.

Paula created cool looking bacteria and we decided to move them around screen - like they are under microscope.

For that purpose Martin added animation timeline, and path fallowing so it was not hard to create such animation.

Martin also suggested that we can have one big panel size and just do panel offset to get part of the screen we want on different devices.

He also implemented a way to move frames from the code itself, one variable that will change from code and move frames.

I have used that variable to create two different screen types, one will be sender and have "blink led" counter.

And one will be receiver and move frames as pulses are arriving.

With that in place I was able to fully sync frames on both screens.

Adding and syncing more screens would be also possible, but for this exhibition we did not have time.

So here is what we had there:

Even more screens

I did not have any not supported screens left, so I checked on net what is on offer.

I was specially interested in RP2040 platform. After some search I have found that Waveshare has lots of great screens, so I decided to ask for few.

They answered my mail promptly and send my explanation to engineer who agreed that EEZ Studio has great potential and approved giveaway of screens to sales office.

In no time I got tracking no. for those screens...

4.2inch e-Paper Cloud Module

1.54inch e-Paper Module (B)


2.4inch LCD Module

M5stack with high speed DMA

While waiting and while porting is still fresh in my head I saw that m5stack was quite popular, so I also decided to test it.

I bought 2 M5stack devices from Mouser and just changed few settings in menuconfig but graphics was kind of laggy from ESP-IDF.

I have checked other options and found some library that was using DMA transfer.

They used platformIO as platform so I decided to give it a try.

After some time I got everything working and it was super fast!

Another platform is ported!!! Woohooo!!! Wellcome RP2040!!!

As platformIO is common platform for different hardware I also checked if there is some project that is using platformIO and RP2040 board, as that one is also common and popular among makers.

After finding one I only needed to connect few pin, but nothing worked.

So I decided to use picoprobe (another RP2040 board) as debugger -

After some trial and error I have found options that worked in VSCODE and in no time I have found and fix RP2040 port!

Few more screens that are supported

Arrival of the screens!

At some points screens from Waveshare just showed up!

I will write about those in our next blog.

There are also some news about cool and fast Raspberry Pi bare metal LVGL

Until next post!

By: Goran Mahovlić

This project is funded by NLnet

© Intergalaktik