Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

mxklabs - Raspberry Pi Touchscreen Application


NOTE: Please note this project is not finished -- it is a work in progress!


Hardware & setup

This code is designed to run on a Raspberry Pi with the official touchscreen display. We recommend using these products:

You will also need a variety of other things to get up and running (like a micro SD card with the latest Raspbian Stretch image, a display, a keyboard, etc.). This guide assumes you already have a Raspberry Pi up and running with a Raspbian Stretch OS and the official Touch Display. If this is not the case you find some basic guides here, here and here.

Installing software dependencies

Our application requires Python 3 (already installed on Raspbian Stretch) with some additional dependencies:

  • Install six (a python 2/3 compatibility library): pi@raspberrypi:~$ sudo python3 -m pip install --upgrade six

  • Install dotmap (a library for dealing with dictionaries): pi@raspberrypi:~$ sudo python3 -m pip install --upgrade dotmap

  • Install Cairo: pi@raspberrypi:~$ sudo python3 -m pip install --upgrade cairocffi

  • Install the Google API Python client: pi@raspberrypi:~$ sudo python3 -m pip install --upgrade google-api-python-client

  • Install the TkInter imaging module: pi@raspberrypi:$ sudo apt-get install python3-pil.imagetk pi@raspberrypi:$ sudo apt-get install gir1.2-webkit-3.0

Installing this software (mxklabs-pi)

The easiest way to install our this repository is to use git to clone the source code directly from the github repository:

pi@raspberrypi:~$ git clone

This puts the source code in /home/pi/mxklabs-pi. Now, you should be able to manually start the application as follows:

pi@raspberrypi:~$ python3 mxklabs-pi/

Configuring mxklabs-pi software

If you're planning to use the Google Calendar API feature then you'll need to download a client_secret.json to /home/pi/mxklabs-pi/credentials/google-api/client_secret.json (follow this guide). Note that this application was developed to stay within Google's free tier quotas; there's no need to add a billing account.

Post-Installation Tweaks

  • To turn your screen upside down add the line rotate_lcd=2 to the top of /boot/config.txt.
  • To auto-start the application on startup add @/usr/bin/python3 /home/pi/mxklabs-pi/ to the bottom of /home/pi/.config/lxsession/LXDE-pi/autostart.
  • To set the brightness of the display set /sys/class/backlight/rpi_backlight/brightness to a number between 0 (dark) and 255 (bright).
  • To force the screen to stay on add xserver-command=X -s 0 dpms to /etc/lightdm/lightdm.conf's [Seats:*] section.
You can’t perform that action at this time.