FPGA buck-boost – 02/11/2021 – QML controlling FPGA

At this point I want to start controlling the PWM with a more elegant UI. One way to do this is using QT. QML is a IDE/language/designer built with embedded devices in mind. I like QT Quick because it has a well defined separation of view and c-code. QML is very responsive and works with binding, and you can make a beautiful graphical layout including anchors with resizing built in. Their are elements for displaying lists and grids with the capabilities for animation and so much more. I would like to reference the KDAB tutorials as I spent some time to better acquaint myself with the basics. I went through all 50 videos, and continue to look for ways to improve

https://www.youtube.com/watch?v=JxyTkXLbcV4&list=PL6CJYn40gN6hdNC1IGQZfVI707dh9DPRc

I started with a basic design, just a slider to control the duty-cycle. I improved it a little, and also used built in features of QT Creator to cross-compile and debug on my Raspberry Pi. This is with the straight forward Raspbian OS, Buster. The updates, upgrades, installation of QT for the libraries, etc… were mostly handled through the apt package handler. Their may have been some configurations that I implemented for static IP and SSH on boot for easier development. These are some basic things for working with Linux. Here are some pics of my simple GUI

As of this point we have an embedded application running on the raspberry pi. I access the application from my laptop (using the shared network and known IP address of the PI), by starting the application from a Putty terminal. On the command line I type

sudo ./QT-PWM_control -platform vnc

I need to use sudo because the bcm2835.h an library require root access to function. This is how I send my SPI message. I use the -platform vnc because to create the graphical interface on my laptop I need to access a Windows X or graphics connection of some sort. I want to learn more about these types of implementation as I am aware their is like EGLFS which uses more an OpenGL, and I know with HTML a server sends text which is then rendered on a browser. For now, this works. This command opens a port on the Raspberry Pi. I then use TigerVNC, which is a VNC client that can attach to this port (5900 by default). VNC works well, and I am able to push the buttons and see everything fairly quickly as I update the duty cycle which I can see is quickly updated on my oscilloscope.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s