January 15, 2019 • 1 • 4.1
A Raspberry Pi is a micro-computer and, well, still a computer. You can quite easily turn this board into a more conventional computer with a keyboard, mouse, and—most importantly—a screen! Depending on your use case, a touchscreen can be very handy and connects easily to the Raspberry Pi. In this tutorial, I'll show you how to connect it, configure it, and enjoy it.

To follow along, here's what you'll need (you probably already have most of it).
Once you have everything, we can move on to wiring.
Haven't received your screen yet? Here's what the box looks like and what's inside:
To use the screen with the Raspberry Pi, the CD isn't necessary. (Thankfully!) First, I recommend installing the 4 screws with the nuts, as shown below (no screwdriver needed). They protect the components on the back of the screen, avoiding contact with metal surfaces, for example.

Once the screws are in place, connect the screen to the Raspberry Pi (preferably powered off). Simply plug the HDMI cable between both ports, then the micro-USB cable to one of the two connectors on the screen and the other end to a USB port on the Raspberry Pi.
Sometimes you'll need a separate power supply for the screen. When the Raspberry Pi is under load, it draws more current, and there may not be enough left to power the screen. In that case, a small yellow lightning bolt appears at the top right. The fix is to connect an additional power supply to the second port. Note: You can't power only the screen without connecting it to the Raspberry Pi—otherwise the touchscreen data wouldn't be processed by the Pi.
Poor display quality? Black bars on the sides? That's normal—we need to tweak a few settings on the Raspberry Pi. First, open a terminal and type:
sudo nano raspi-config
Go to Advanced Options -> Resolution. For a 7-inch screen, I use DMT Mode 4 640x480 60Hz 4:3. It's not necessarily the most appropriate resolution for the screen, but I prefer it since the text is fairly large. With resolutions like 1280x720 or 1920x1080, text can be hard to read. Feel free to try different resolutions to find what works best for you.
The sudo raspi-config tool lets you change display resolution easily, but it doesn't expose all configuration parameters. To access everything, edit /boot/config.txt, for example by running:
sudo nano /boot/config.txt
If you have overly wide borders, just uncomment the following line (remove the leading #):
disable_overscan=1
To apply changes, save (Ctrl+X -> Y (or O) -> Enter) and reboot the Raspberry Pi.
Reminder: reboot with the following command:
sudo reboot
If you use the screen with a wireless mouse, you may notice a slow, laggy cursor. Fortunately, there's a fix!
First run:
sudo nano /boot/cmdline.txt
You'll see a single-line file with many parameters. To fix the cursor issue, append this at the end of the line: "usbhid.mousepoll=0". Save the change (Ctrl+X -> Y (or O) -> Enter) and reboot the Raspberry Pi.
Next boot, the mouse should move normally!
Essential accessories to get started with Raspberry Pi 4
Choose and use a camera on Raspberry Pi
Raspberry Pi 5 (8 GB version)
92.59 €
Raspberry Pi camera 5MP 1080p
12.95 €




4.1/5 | 9 votes