Skip to content

Building for Raspberry Pi

Kurt Kiefer edited this page May 5, 2018 · 25 revisions

These instructions detail how to build GetThermal for Raspberry Pi, presuming you're starting out from Raspbian Stretch (the current release). If you're starting out with Raspbian Jessie, first upgrade to Stretch, or see the end of this guide for instructions to upgrade.

1. Enable OpenGL Kernel driver

In order to experience acceptable rendering performance (both with and without X) you will have to enable the OpenGL driver. Open a terminal and run the following:

sudo raspi-config
    Select "Advanced Options"
    Select "GL Driver"
    Select "GL (Full KMS) OpenGL desktop driver with full KMS"
    Select "ok"
    Select "Finish"
sudo reboot

2. Install development packages

Open a terminal and install the following packages, required for building GetThermal:

sudo apt-get install qt5-default qtmultimedia5-dev qtdeclarative5-dev \
    qml-module-qtquick-controls2 qml-module-qtmultimedia \
    qml-module-qtquick-layouts qml-module-qtquick-window2 \
    qml-module-qtquick-templates2 qml-module-qtgraphicaleffects \
    libusb-1.0-0-dev cmake git

3. Clone and build GetThermal

  1. Clone
git clone https://github.com/groupgets/GetThermal.git
cd GetThermal
git submodule update --init
  1. Build libuvc
cd libuvc
mkdir build
cd build
cmake ..
make
cd ../..
  1. Build getthermal
mkdir build
cd build
qmake ..
make

Congratulations! Your output binary can be found in release/GetThermal. You can copy GetThermal to /usr/bin/ for convenience.

You may find that you lack the permissions to use your PT1 as a normal user. The following command creates a UDEV rule to allow everyone access to the camera:

sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"1e4e\", ATTRS{idProduct}==\"0100\", SYMLINK+=\"pt1\", GROUP=\"usb\", MODE=\"666\"' > /etc/udev/rules.d/99-pt1.rules"

The best way to run the application fullscreen is to use the eglfs QPA plugin:

GetThermal -platform eglfs

How to install GetThermal on a Raspberry Pi [Video]

How to install GetThermal on a Raspberry Pi


Appendix

Upgrade Raspbian Jessie to Raspbian Stretch

This is only required if you are starting from an older Raspbian Jessie build. It is required to build against the QT 5.7.1 binaries. Instructions transcribed from linuxconfig.org. See there for a more detailed account.

  1. All commands need to be executed as root, so open a terminal and run su to execute all commands as root:
sudo su root
  1. Start by fully upgrade your current Raspbian system before you proceed with a Stretch upgrade.
apt-get update
apt-get upgrade
apt-get dist-upgrade
  1. Alter /etc/apt/sources.list to point to stretch instead of jessie
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
  1. Update new package index
apt-get update
  1. Upgrade to stretch
apt-get upgrade
apt-get dist-upgrade
  1. Reboot
reboot