Saturday, April 15, 2017

Home Automation Controls - Why I'm not Using Qt 5.8

Follow Along with my Development on this project. I'm just kind of wingin' it Github - HomeControls

Simply, it's a pain. Qt 5.3 is available from the repositories and an all you need is an apt-get install on the Rpi to be in the game. While it seems simple enough to compile 5.8 for the Pi (setting up the cross compiler or compiling natively), it's not more simple than just typing apt-get install qtcreator qt5-default, which installs the ide as well as the dependencies. Yes, I'm going to be missing some of the new features in 5.8, but my goal right now is to create automation controls. The next iteration will be to make them more whizbang.

Also, I'm going to compile the qt projects natively on the Pi. I'm not going to worry about setting up a cross compiler environment for the time being. I'm going to use SCP to copy the qt project over to the pi, then compile the project natively. The process is simple enough SCP -> qmake -> make -> run the program. I'll detail the build steps in greater detail.

Hardware Setup

Adafruit makes these nice little TFT shields for the Raspberry Pi. The frame rate may be on the low side, but the compactness is pretty awesome. I may switch over to a small HDMI screen to see if there is a performance boost. Adafruit also makes a similar product, but with an HDMI screen.
The touch screen is a resistive film type and seems to have good enough resolution to poke even the smallest of window controls. A stylus is a good addition for this screen or make sure your style your buttons large enough for fat fingers like mine.

Software Setup

For the interface side, I'm going to rely on Qt's awesome qml. It's flexible, fast, and anchoring. Anchoring is everything you wish HTML had. Here's a novel idea in qml, centering something in a container is easy. What a thought....

If you've never seen qml before, I recommend you find a tutorial online. The official Qt documentation is quite good. I'll throw in the practical bits on hooking things up.

No comments:

Post a Comment