We featured [Fabrizio Di Vittorio]’s FabGL library for the ESP32 back in April of this year. This library allows VGA output using a simple resistor based DAC (3 resistors for 8 colors; 6 resistors for 64 colors), and includes functions for PS/2 mouse and keyboard input, a graphics library, and many of the miscellaneous functions you might need to develop games on the ESP32. Now, a GUI interface library has been added to ease application development.
The GUI, of course, runs on the VGA output. The library includes what you’d expect from a minimal windowing GUI, like keyboard and mouse support, windows with the usual minimize/maximize/close controls, and modal and message dialog boxes. For input controls, there are labels, text boxes, buttons, radio buttons, checkboxes, normal and editable combo boxes, and listboxes — you know, pretty much everything you need to develop a modern GUI application. All the code is open-source (GPL 3.0) and in the GitHub repo.
While the original FabGL had a game-development orientation, the addition of this new GUI functionality opens up a new range of applications. If you want to find out more about using the FabGL library, you can check out our previous coverage of the mostly game-oriented functions.
You can get a look at the new GUI functions in action in the video, after the break.
38 thoughts on “ESP32 Gets Advance Windowed Apps Using This VGA GUI Library”
This is amazing, I wonder if it works well with this guy
edit: it in fact does! https://github.com/fdivitto/FabGL/wiki/Boards
Thanks for sharing, I just bought this. I believe it has an esp32 built in, but I’d love to find just a Hat for future projects.
Looks like the same test program.
Is this the same guy?
Mind you very very cool.
it seems to be
Thanks for posting that aliexpress link. I was wondering about the keyboard/mouse.
That is a sick little board for $12. Where did I put my spare VGA monitor…
FYI for aliexpress URL, you can drop everything starting at the ‘?’ The rest of that junk is to keep track of your session.
I got it.
I’ve just listed compatible boards, I’ve nothing to do with them!
It’d be interesting to see a vnc port to that vga hardware. I used to have one for the old-school black and white Palm PDAs, but it was useless because I only had the docking station and not a modem or other way to remotely connect.
Or an X11 server!
Christ it hurts to think that this is on a $3 microcontroller… The world we live in…
Do you mean porting the graphics library to export its display via VNC instead of VGA? I don’t imagine it would be TOO difficult, the only question would be implementing the compression algorithms in the resources available.
I have previously implemented the Keyboard/Mouse part of a VNC server in a couple hundred lines of code. It would be interesting to see if this would be feasible.
However, I suspect that using HTTP rather than VNC would be a better fit for any remote interfaces, since it offloads the UI processing to a more capable device, with minimal load on the resource-constrained microprocessor.
I was thinking the other direction actually.
Although while searching around I found something I forgotten about, someone did write a micro-vnc server for 8-bit microcontrollers. Apparently they even had a C64 that people could vnc into at one time. http://dunkels.com/adam/uvnc/
So that direction is certainly possible.
I was thinking it would be interesting if you could have a vnc client on the ttgo esp32 vga board and use it to vnc into another computer. IIRC, you can set options in vnc to limit the number of colors that it transfers, so the 64 colors shouldn’t be a huge problem. I’m not sure if there’s enough ram for it though.
I’m sure this has ben done already by someone ESP famous (the name escapes) he did kbd/mouse remotely with soft USB ?
So, web browser next?
Well, if a 8088 XT with a modem can do that with Arachne then an ESP32 WROOM should be able to keep up.
But does it run Crysis
But does it run Doom?
It would be helpful if you could explain what things mean.
Example: “a simple D-based, A-doing, C-thing (DAC)”
Sadly it appears that the Hackady Stylebook doesn’t allow for that. :(
DAC = Digital to analog converter. Opposite of an ADC.
We _do_ try to spell things out when we think it would be helpful. Unfortunately, we can’t get it right all the time, or for everyone. Sometimes a common acronym will slip under the RADAR.
It’s also context dependent. This is, after all, an article about an ESP32 VGA SDL GUI!
RADAR = radio automated detection and ranging… 😀
Probably it won’t matter much as people that don’t know DAC likely won’t know what is Digital to Analog Converter either. Google will give you much more.
More importantly is to spell out units like megabits vs megabytes as the difference is a factor of 8 and people have a really bad habit of not following proper cases – some capatialize first letter cap = English naming convention, some lower case everything and some uppercase everything. Do it right the first time and save lots of confusion and correcting afterwards. This is something that google won’t help.
While this is really neat, the ESP32 being a dual core MMU-less microcontroller with limited RAM and no GPU is not the ideal platform for GUIs in my mind. I’d very much prefer to use a Raspberry Pi Zero / 3 / 4 with a library like Qt / GTL or even Nuklear.
A pi zero W has a lot of advantages over this guy, but this is at least cool. Beyond that, there could be very specific applications that could benefit from a simple gui. Maybe you have a vga kvm switch in a server room and you need a specific appliance for monitoring things or resetting rogue machines? It would have to be pretty specific to warrant this over a pi. Maybe some real time constraint that would be hard to accomplish with a pi.
And why not an i7 NUC box and run py-game on top of win10 ?
I think you are missing the point.
No I didn’t…It is a really neat piece of software. Neat and geeky. Not the most efficient way of doing GUI in 2019, but a real hoot to play around with if you are into that sort of thing.
Well before you were born systems like the Atari ST, Amiga and PC-AT’s running GEOS with 512k RAM were the norm for desktop window machines and we did just fine with them.
I remember when Windows 3.1 was the norm for 286 and 386 based desktop systems in AF flight test.
We didnt need some Pi and gigabytes of RAM to write a simple “hello world” program.
Yeah the 80s were great thirty something years ago. I get it. But we Live in 2019. We have the tech and hardware to do GUI better. Also RAM is a heck of a lot cheaper than it was in 1976.
people enjoy the challenge of using hardware in a way it is not suited for.
I get it I really do. It’s awesome and a really cool hack. But that doesn’t change the fact that If I was to build a GUI to be used by an average person in 2019, I’d have to use a more modern solution/approach. That’s all I’m saying.
Also a modern solution would probably be easier to setup and use, but less satisfying than developing an old school GUI library on under-powered hardware and older video output hardware.
Yo wibble, go have coitus with yourself
Well The Mac, Atari ST and Amiga ran a gui based os just fine in the 80s, no need for Gigabytes of ram or a multicore cpu :)
Love it. Can’t wait to give it a try. From my perspective, boot time and robustness are the main advantages. (+Everybody can buy a Pi ;-))
I actually like the littlevgl library as a gui lib for MCU stuff (https://littlevgl.com/). I bet it could be made to work with this VGA library.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)