Detailed Installation

If you've grabbed our Easy Install image, or use the script, this step is not required, it's already done! This is just for advanced users who are curious on how to configure and customize the kernel install

In the next few steps we'll cover the detailed installation procedure. Chances are, you should grab the Easy Install image or script. If you have some interest in the details of how we install the PiTFT setup, read on!

In order to add support for the 2.8" TFT and capacitive touchscreen, we'll need to install a new Linux Kernel. Lucky for you, we created a kernel package that you can simply install over your current Raspbian (or Raspbian-derived) install instead of needing a whole new image. This makes it easier to keep your install up-to-date.

To use our kernel .deb files you must be using Raspbian or derivative. This wont work with Arch or other Linux flavors. As Raspbian is the official OS for the Pi, that's the only Linux we will support! Others can recompile their own kernel using our patchfile, but we have no tutorial or support or plans for such.

Before you start

You'll need a working install of Raspbian with network access. If you need help getting that far, check out our collection of Pi tutorials.

We'll be doing this from a console cable connection, but you can just as easily do it from the direct HDMI/TV console or by SSH'ing in. Whatever gets you to a shell will work!

Also, run sudo apt-get update !
To run these all the setup and config commands you'll need to be logged into a proper Terminal - use ssh, a console cable, or the main text console (on a TV). The WebIDE console may not work.


Download & Install Kernel

The only way we're distributing the PiTFT kernel packages right now is thru so you'll still need to run:

curl -SLs | sudo bash

To add to your list of software sources and make it the default source for packages it hosts

Then install the kernel with

sudo apt-get install raspberrypi-bootloader

This will take a up to 20 minutes so go make a sandwich or coffee. It takes longer than it used to because there's now 2 kernels (v6 and v7 arm) and 2 kernel module directories.

OK since you're not going to run the helper, lets add the device tree overlay manually. Edit /boot/config.txt with

sudo nano /boot/config.txt

and add the following lines at the end:


The rotate= variable tells the driver to rotate the screen 0 90 180 or 270 degrees.
0 is portrait, with the bottom near the "Adafruit Logo"
90 is landscape, with the bottom of the screen near the buttons.
180 is portrait, with the top near the "Adafruit Logo"
270 is landscape, with the top of the screen near the buttons.
You can change this file with nano and reboot to make the change stick.

The speed= variable tells the driver how to fast to drive the display. 32MHz (32000000) is a pretty nice 20 FPS rate but if your screen is acting funny, try taking it down to 16MHz (16000000)

Save the file. Now we'll just reboot to let it all sink in.

sudo shutdown -h now (if you don't have the TFT installed, shutdown, place the TFT on the Pi and re-power)


sudo reboot (if you have the TFT plate installed already)

When the Pi restarts, the attached PiTFT should start out all white and then turn black. That means the kernel found the display and cleared the screen. If the screen did not turn black, that means that likely there's something up with your connection or kernel install. Solder anything that needs resoldering!

Now that you're rebooted, log back in on the console/TV/SSH. There's nothing displayed on the screen yet, we'll do a test to make sure everything is perfect first!

Run the following commands to startx on the /dev/fb1 framebuffer, a.k.a PiTFT screen:

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
export FRAMEBUFFER=/dev/fb1

You should see the Pi desktop show up on the TFT! Congrats, you've completed the first test perfectly.

Hit Control-C in the console to quit the X server so we can continue configuration

Next up we'll add support for the touch screen automatically on boot. Edit the module list with

sudo nano /etc/modules

and add ft6x06_ts on a line at the end

Save the file and reboot the Pi with sudo reboot and look at the console output (or run dmesg in the console window after logging in) you will see the modules install. Look in particular for the FT6206 (a.k.a. FT6x06) detection and the ILI9340 screen frequency as highlighted here

We can set up the touchscreen for rotate=90 configuration by doing the following (for more delicate calibration or for other rotate=XX values, see the next section)
Create the directory and new calibration configuration file:
sudo mkdir /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/99-captouch.conf
and enter in the following lines, then save.
Section "InputClass"
         Identifier "captouch"
         MatchProduct "ft6x06_ts"
         Option "SwapAxes" "1"
         Option "InvertY" "1"
         Option "Calibration" "0 320 0 240"
You can now try to run X again with
FRAMEBUFFER=/dev/fb1 startx
The touchscreen now works, you can try it out!
Type Control-C to quit X

If you don't ever want to have to type FRAMEBUFFER=/dev/fb1 before startx, you can make it a default state by editing your profile file: sudo nano ~/.profile and adding
export FRAMEBUFFER=/dev/fb1
near the top and saving the file. Then reboot to reload the profile file. It will now always assume you want to use /dev/fb1
Last updated on 2016-10-19 at 01.17.13 AM Published on 2014-07-21 at 05.51.08 PM