Once you have a Raspberry Pi or RBPi, you need a keyboard and a monitor to communicate with it. Provided the monitor has a touchscreen, you can dispense with the keyboard. Just such a touchscreen LCD is available from 4D systems and Newark Element14. Their 4DPi-24-HAT is a 2.4-inch, resistive QVGA LCD with a resistive touchscreen and designers claim this is the first device to use the full HAT design.
HATs or Hardware Added on Top boards enable the RBPi SBC to configure its GPIO signals and drivers for use with the external devices on the board. Users find this easy for installation, and the burden on developers reduces considerably. Although this is not the first touchscreen to use the HAT interface, the 4DPi-24-HAT has its own argument for being the first device to use the full HAT design.
For example, Adafruit offers PiTFT, a 2.4-inch TFT touchscreen supporting a HAT connection. This is 320×240-pixel kit, requiring soldering to attach the 2×20 GPIO header to the HAT board. Although this is fast and easy to do, the 4DPi-24-HAT does not require any soldering.
The 4DPi-24-HAT, with its 320×240-pixel resolution, is on the low end of the spectrum for available touchscreens for the RBPi. It also uses a 4-wire resistive touchscreen, rather than the more sensitive capacitive touch technology. With a typical video frame rate of 25 frames per second, the touchscreen supports full-color. According to 4D Systems, the frame rate can be increased with kernel compression.
Users can display the output of RBPi Models A+, B+ or the latest RBPi-2 Model B on the screen of the 30-gm, 65×56.5×14.4mm display. No external power is necessary, as the display sits directly on the 40-pin header and draws its required power from the RBPi.
4D Systems has optimized the 4DPi-24-HAT for operations with the Raspbian Linux. The RBPi communicates with the HAT via SPI connection at 48MHz. The display utilizes an on-board processor featuring a customized DMA enabled kernel. The processor interprets direct commands and takes care of the SPI communication.
An on-board jumper is useful for switching on or off the backlight of the display. Dimming of the backlight is also possible through PWM signals and controls. The RBPi is able to recognize the device quickly because of the EEPROM on board the HAT.
When you place the touchscreen on the RBPi, it sits on the entire bank of the GPIO connectors. It also almost covers the RBPi, excluding the Ethernet and USB ports. You can use standoffs to support the other end of the display to prevent it from hanging. The screen also fits neatly within the official RBPi case.
To power up the display from your RBPi, you have to download the 4DPi-24-HAT kernel from the 4D System’s website. By default, this kernel will replace the file config.txt at /boot. To get the display to work you now need to play around with the framebuffers on the device. This way, you can get it to display a higher resolution image and even enable other features on the screen.
For example, the file /boot/cmdline.txt will allow you to rotate the image on the screen to rotate by 0, 90, 180 or 270-degrees.