Less is More
The inexpensive Display-O-Tron HAT has a three-line LC display, making it perfect for projects that need a display but not a bulky monitor.
The inexpensive Display-O-Tron HAT has a three-line LC display, making it perfect for projects that need a display but not a bulky monitor.
It often seems like overkill when a full-grown monitor is hooked up to a diminutive Raspberry Pi (Rasp Pi). Even the official thin-film-transistor (TFT) display for the Rasp Pi is fairly large, making it impractical for some compact mobile solutions. The small TFT-based displays that come in Rasp Pi size are far less bulky by comparison. However, the lack of a suitable X Window GUI toolkit for this form factor [1] means working with the TFTs is not much fun.
Hardware extensions for the Rasp Pi have been standardized in the form of Hardware Attached on Top (HAT). HATs have given rise to many interesting components that function similarly to the plug-and-play principle. The UK manufacturer Pimoroni [2] has gained recognition for its many interesting HAT projects. For instance, Pimoroni manufactures the $28 (EUR22/£22) Display-O-Tron HAT (Figure 1).
You can purchase the Display-O-Tron from Adafruit [3] in the US and Pimoroni [4] in the UK. You'll discover the Display-O-Tron is a perfect fit for the gap that exists between a headless system and a regular display screen. Given that both software support and pricing are excellent, this display attachment serves as an inspiration for many interesting projects.
The Display-O-Tron has a three-line display that accommodates 16 characters per line. The display can handle messages to the user and also text input. Mechanically speaking, the HAT is well executed, except that the manufacturer could perhaps think about including spacer pins with delivery. The specifications call for a 10 to 12 millimeter space for the attachment. One centimeter should suffice with the Display-O-Tron HAT. Spacer pins are not absolutely necessary, since the buttons react to touch instead of pressure. It comes as something of a surprise, however, that the Raspberry Pi 3 cover no longer closes over the Display-O-Tron, even though the appropriate cutouts exist.
The Display-O-Tron HAT is the successor to the very similar Display-O-Tron 3000 HATs, except that it comes with more functions. The user should therefore take a careful look at the product description before ordering a HAT. Github hosts a project where you will find a suitable Python library for the Display-O-Tron [5]. See the Pimoroni site for a Display-O-Tron support forum.
Installation is accomplished quickly using a "Jessie Lite" image. The user configures the system as desired with the initial boot. The following command downloads and executes an installation script from Pimoroni:
$ sudo curl get.pimoroni.com/dot3k | bash
Pimoroni issues a clear warning against this kind of installation due to security concerns. In theory, it is better to make a backup of the script and then meticulously check it over before executing it. Users wanting to perform installations manually will find directions in the box entitled "Manual Installation."
Manual Installation
Users who dislike executing scripts from the Internet as root can install the Dot3K library from Pimoroni by hand. You'll need to load the required packages from the Raspbian package manager (Listing 1, Line 1 and 2) and then install the Dot3K library (Line 3).
Once the software is on board, activate the SPI and the I2C interface of the Rasp Pi. Edit the /boot/config.txt
file and make sure the lines from Listing 2 appear. Both lines come with a freshly installed "Jessie Lite." The user need only remove the comment character #
and replace the off
value with on
. The last step is to add the i2c-dev
line to the /etc/modules
file. This line causes the system to automatically load the I2C kernel module when starting.
After a restart, check to see whether Raspbian follows the command as desired and creates the data files /dev/spi*
and /dev/i2c*
. In addition, you'll need to retrieve the sample programs for the Dot3K library from Github and try them out.
Listing 1
Installing Packages
01 $ sudo apt-get update 02 $ sudo apt-get install python-pip git i2c-tools python-rpi.gpio python-dev python-smbus python-gpiozero 03 $ pip install dot3k
Listing 2
Add to /boot/config.txt
dtparam=spi=on dtparam=i2c_arm=on
The software installation routine is interactive. You'll need to grant permission in order to complete the process. In addition, the script lets the user install sample projects. Don't accept this option unless you want an entire X environment to land on the system. One sample, for instance, uses the VLC player. Instead, it is a good idea to get samples directly from the Github project.
The display works fine without exotic kernels or kernel modules. One interesting kernel module option [6] depicts the interface for the system on pseudo files in the /sys
filesystem. This approach makes it possible to speak to the display via read and write operations independently of the programming language.
Pages: 6
Price $15.99
(incl. VAT)