How to Setup Your Raspberry Pi Touchscreen
The Raspberry Pi comes with a variety of useful add-ons, from handy cases and the popular Pi Cam module to HATs, expansion boards that connect to the Pi’s GPIO pins. But one piece of kit that has proved particularly popular is the Raspberry Pi 7-inch Touchscreen Display.
While various displays are available for the Pi, few are as versatile and flexible as this, an official Raspberry Pi product. But if you’ve ordered one, you might have found yourself unsure as to how to proceed. Just how do you connect the Raspberry Pi Touchscreen to your Raspberry Pi computer?
What’s in Your Pi?
Before proceeding (preferably before buying!) you should take a look at your Raspberry Pi device. While compatible with all of the standard boards, you’ll have difficulty setting the Raspberry Pi Touchscreen up with a Pi Zero , as the device doesn’t have all of the required connectors.
However, if you have a standard Raspberry Pi Model B, B+, 2, or 3, you should be able to use the Raspberry Pi Touchscreen with this device.
But… there’s one other caveat. Only the revised PCB design of the Raspberry Pi 2 and Raspberry Pi 3 is compatible with the mounting screws on the back of the touchscreen display. This means that you’ll need to take different steps to securely attach (or otherwise) an older Pi board.
We’re going to continue now to look at how to attach the Raspberry Pi 7-inch Touchscreen Display to a Raspberry Pi 2 or 3 board.
Leave the Protective Film in Place!
One thing you should not do until your Pi and your touchscreen display are correctly connected and attached is to remove the protective film that comes already applied to the display. It may look unsightly, but at this stage that doesn’t matter — what does matter is that you’ll be able to protect the new touchscreen device from any scratches and nicks that might occur during the connection process.
So do yourself a favor, and leave the protective film in place, just a little bit longer!
Upgrade Your Pi
You’ll need to make sure your Raspberry Pi is correctly configured to use the touchscreen before you connect the devices. To do this, boot your Raspberry Pi and in the terminal enter the follow commands, waiting for each to complete before entering the next:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get install raspberrypi-ui-mods sudo apt-get install raspberrypi-net-mods
This will ensure that all of the correct drivers and interface software applications are installed before you connect the touchscreen display.
Once these updates are installed, we can get to work. Time to get your toolbox out!
Connect the Display Board to the Touchscreen Display
Before you connect the Pi to the touchscreen display, take an extra precaution. You should either leave the display in its box, but face down so that the touchscreen is resting upon the foam packaging, or place it face down on a towel on table.
Next, establish whether or not the display board is connected to the orange ribbon cable and the display. In older boxes, you’ll have to do this manually; ours is a newer box, with these components already connected.
The orange ribbon cable connects in two places on the display board; the narrow end connects to the Panel 1 connector, which has a small clamp that will need to be undone before you insert the ribbon and tighten it again. The wider ribbon connects to the other side, to the connector labelled Panel 2, in the same way. Use the four spacers to fix the display board to the back of the display, and you’re ready to continue.
Connecting the Raspberry Pi to the Touchscreen Display
The next stage is to actually hook up the Pi to the touchscreen.
Do this by first connecting the four cables to the 5V, Ground, SCL and SDA connectors on the display board. Although it doesn’t strictly matter, we suggest you follow convention and use red for 5v, and black for Ground.
Then insert the white ribbon cable; the end that you’re inserting now should have the blue side facing the display (the other end will have the blue tab facing upwards). Lock it in place by securing the catch.
Next, place your Raspberry Pi on top of the risers, and secure it with the screws. Note that if you purchase a photo frame-style display for this, you may find that things are more compact if you mount the Pi with the GPIO underneath. For now, however, the GPIO needs to be accessible, so leave it facing up.
Connect the four jumper cables to the GPIO, matching 5V to 5V, Ground to Ground, etc. Check the GPIO array for your Raspberry Pi model to ensure you’ve got the cables connected correctly; on a Raspberry Pi 3 the cables will be connected as above.
As you might have guessed, these cables manage the power supply from the Pi to the display, but also transmit touch information to earlier Pi models – on newer models, the green and yellow I2C connection is built into the ribbon cable, so they aren’t actually needed.
You don’t have to connect them like this though, though; you couldn’t place a HAT on top, for instance. You might prefer to use a Y-splitter from a standard Raspberry Pi power supply, or use a second power supply. If you’re using a portable battery for this project, you’ll be able to keep the display and Pi running from the same power source.
Next, connect the ribbon cable to the Raspberry Pi, first unclipping the catch, and slotting it into place without twisting. Press the catch down when the ribbon is fully inserted to secure it. With all of this done, it’s time to connect your power cable to the Pi and boot into Raspbian.
Configuring the Touchscreen
In some cases — particularly if you’re using the display with a stand — you might want to rotate the display so it stays at the correct orientation. Do this over SSH using
sudo nano /boot/config.txt
At the top of the file, enter a new line:
It’s a good idea to leave yourself a commented-out note so you know what this (and any) amendment is included.
Use Ctrl+X to exit the nano text editor, selecting Y to agree to changes, then Enter.
To apply the change, enter
A few moments later, the orientation should be correct.
Also, if you see the boot script but the screen then switches to black, there’s a strong likelihood that you need to expand your Raspberry Pi’s filesystem. To do this over SSH, enter
…and select the first option. Enable Expand filesystem, and then select Finish to reboot.
Your Raspberry Pi, with a Touchscreen Display!
The possibilities for your Raspberry Pi just multiplied again. Perhaps you’ll build a tablet, or some sort of portable media center with OpenElec or Kodi ; this project is also useful for weather alerts, OTT alarm clocks or even a Linux-powered carputer . It should be a good size for a retro gaming center , too…
But what will you be doing with your Raspberry Pi Touchscreen Display? Did you opt for a third party model instead? Tell us about it in the comments.
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.