Display T. Box: The (second) third generation

Lead Image © Gal Amar, 123RF.com

Touched Up

Display T. Box is a Raspberry Pi with a touch display in a compact case. The newest version of the Box comes with revisions that include a better touch screen and more speed.

Often, users will hide a Raspberry Pi (Rasp Pi) behind a TV or inside a cupboard when they are using the single-board computer for an interesting project. However, direct access to the Rasp Pi might be necessary. For example, you might want to read output on the display or input data from a touch screen. The Display T. Box is suited to these and similar requirements with its well-designed case and integrated touch display [1]. The equipment includes a current Rasp Pi 3 (RPi3), a robust box, and a touch screen.

The Display T. Box 3 looks almost exactly like its predecessor, which was tested in a previous issue [1]. Even so, a few details point to changes under the hood. The openings for the Rasp Pi's LEDs have been lined up to match the location of the RPi3's LEDs (Figure 1). The cover has been notched out for the Rasp Pi SD card slot, so you can change memory cards without having to take the case apart (Figure 2).

Figure 1: The reworked Display T. Box 3 also runs from a battery pack, making it mobile, just like its predecessor.
Figure 2: Unlike its predecessor, the RPi3's SD card slot remains accessible from the outside.

A WiFi adapter is not included as part of the equipment because an RPi3 with WiFi built-in is running inside the Box (see Table 1). The 2.5A power supply meets the requirements for the RPi3. In addition to the power supply and the stylus, the Display T. Box comes with a short set of operating instructions. The Pro version of the Display T. Box, which is planned for future release, will include both a 64GB memory card and a set of cables for connecting the Box to a monitor or the Internet.

Table 1

Equipment Included with Display T. Box 3

 

Standard

Pro

SBC

RPi3

RPi3

Display

2.7 inches, 320 x 240 pixels

2.7 inches, 320 x 240 pixels

Memory Card

16GB, Class 10

64GB, Class 10

Power Supply

5V, 2.5A

5V, 2.5A

Accessories

Stylus

Stylus, HDMI cable, Ethernet cable

The RPi3 with a Display

Once unpacked, the Display T. Box is ready to start. Raspbian "jessie" runs on the memory card. The operating system has a display driver that has been integrated into the kernel. The driver comes from a package source maintained by the manufacturer. It is accessible via the repository.pi3g.com.list file from /etc/apt/sources.list.d. In addition to various versions of the LCD kernel, the source contains a series of other packages that are also important for the display (Listing 1).

Listing 1

Displaying Packages

$ aptitude search '~O repository.pi3g.com' | grep lcd
p   linux-image-3.10-3-lcd        - Linux 3.10 for RaspberryPI with support for the pi3g GPIO LCD Display
p   linux-image-3.12-1-lcd        - Linux 3.12 for RaspberryPI with support for the pi3g GPIO LCD Display
p   linux-image-3.18.10-lcd       - Linux 3.18 for RaspberryPI with support for the pi3g GPIO LCD Display
p   linux-image-4.1.12-lcd        - Linux 4.1 for RaspberryPI with support for the pi3g GPIO LCD Display
p   linux-image-4.4.8-lcd         - Linux 4.4 for RaspberryPI with support for the pi3g GPIO LCD Display
p   linux-source-3.18.10-lcd      - Linux sources 3.18 for RaspberryPI with support for the pi3g GPIO LCD Display

You can install a Raspbian system yourself if you do not want to rely on the image that comes with the Display T. Box and then configure the system according to instructions provided by pi3g [2]. If you prefer your own kernel or the pi3g version does not work with your desired system, then you will need to integrate the touch screen driver manually into the kernel [3].

The 320 x 240 resolution display that comes with Display T. Box 3 has not been changed from the previous generation. However, the reworked touch screen has a rougher surface, making it more responsive to input and reducing reflection. Thanks to a structure similar to paper, both a finger and the stylus, which comes as an accessory to the Box, move more fluidly across the screen. To achieve maximum precision during input, the screen still needs to be calibrated in a program that comes with the system (see the "Calibrating the Display" box).

Calibrating the Display

The Display T. Box works with a resistive display similar to those found on early smartphones and on some ATMs. Modern devices now customarily come with a capacitive touch screen. This type of screen recognizes touch gestures made with one or more fingers. To improve the precision of the Box, you should call the program xinput_calibrator from the xinput-calibrator package. The program makes crosshairs gradually appear on each of the four corners of the display. You should then tap these crosshairs as precisely as possible with the Box stylus (Figure 3).

Figure 3: Calling xinput_calibrator from the terminal to calibrate the resistive touch screen on Display T. Box.

LXDE Is On Board

The desktop environment gets called automatically in this generation of the Display T. Box. In previous versions, users called the environment manually. Once attached to a power source, the customary Raspbian LXDE desktop quickly appears on the screen. However, shortcomings inherent to the Display T. Box display resolution promptly make themselves apparent. It is difficult to find an application for the desktop environment that also works with a screen only a few hundred pixels in width (Figure 4). Even simple programs like the LXDE file manager do not run on such limited screen real estate.

Figure 4: Because of limited screen resolution, programs do not have enough space to show an entire window on Display T. Box.

The Display T. Box system comes equipped by the manufacturer such that it only uses the internal display. Once you attach an external monitor via HDMI, then, with the exception of various messages that may appear during bootup, the external screen remains empty. If you want to use a monitor for the primary display screen, it is necessary to configure the X server accordingly. Configuration involves creating the directory /etc/X11/xorg.conf.d (Listing 2, line 2) and then setting up a dualhead.conf file by using the contents of Listing 3 [4]. After restarting, the system will use the external screen as the primary display.

Listing 2

Creating the xorg.conf.d Directory

### Set up Dualhead configuration
$ sudo mkdir /etc/X11/xorg.conf.d/
$ sudo nano /etc/X11/xorg.conf.d/dualhead.conf
### Disable Dualhead configuration
$ sudo mv /etc/X11/xorg.conf.d/dualhead.conf /etc/X11/xorg.conf.d/dualhead.conf.bak

Listing 3

Setting up dualhead.conf

Section "Device"
Identifier "uga"
  driver "fbdev"
  Option "fbdev" "/dev/fb1"
  Option "ShadowFB" "off"
EndSection
Section "Monitor"
  Identifier "monitor"
EndSection
Section "Screen"
  Identifier "screen"
  Device "uga"
  Monitor "monitor"
  Subsection "Display"
    Depth 24
    Modes "320x240"
  EndSubSection
EndSection
Section "Device"
  Identifier "main"
  driver "fbdev"
  Option "fbdev" "/dev/fb0"
EndSection
Section "Monitor"
  Identifier "monitor0"
EndSection
Section "Screen"
  Identifier "screen0"
  Device "main"
  Monitor "monitor0"
  Subsection "Display"
    Depth 16
  EndSubSection
EndSection
Section "InputClass"
  Identifier "Invert Touchpad"
  MatchProduct "ADS7843 Touchscreen"
  Option "InvertX" "true"
  Option "InvertY" "false"
EndSection
Section "ServerLayout"
  Identifier "default"
  Screen 0 "screen0"
  Screen 1 "screen" RightOf "screen0"
  Option   "Xinerama" "1"
EndSection

Classic Linux computers can integrate an additional monitor or a projector and extend the desktop while in operation. However, the switch-over will not be dynamic. With the Display T. Box, the system moves the LXDE panel and therefore also the application menu to the external screen, even when it has not yet been connected. To deactivate this dualhead configuration, you should factor out dualhead.conf from the system configuration by renaming it, and then you should restart the Display T. Box.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content