There are a lot of exciting add ons for the Raspberry Pi, in the main plug in modules for the GPIO port. The General Purpose Input/Output connector has 26 pins in 2 rows (2×13) and adds a number of expansion capabilities to your Pi. Today we will cover the Software Setup procedure first as there is a number of inaccurate tutorials out on various blogs; I will cover Hardware assembly later. We will be using a 512mB model B Raspberry Pi, this is important due to the numbering of the GPIO pins. I highly recommend that you use a prebuilt TFT Wheezy. img – this optimised and documented by Notro to work very well with Adafruits 2.8″TFT, download .img here. After you have assembled your TFT and downloaded .img follow my tutorials to Bake the SD card here. Once you’re ready to boot up, connect Ethernet cable, mouse, Keyboard – insert SD Card and Power up – your Pi will boot straight in to your TFT Touch screen – exciting stuff:
Log in as usual and type in:
You will then be greeted with this screen, you MUST go through calibration, follow instructions exactly (use a soft but sharpened pencil) :
Tadaaa, you have a mini touchscreen Raspberry PI – Well Done !!
There are a number of things we should do to make the PiTFT easier to handle and control – after all there’s only so much we can do with a 2.8″ screen , touchscreen or not. We have here soldered on the optional 4 buttons enabling us to control Shutdown and Screen Brightness easier without having to delve in to the GUI. We should also setup a Wifi Dongle – this makes the PiTFT a truly portable device combined with a High Capacity Powerpack / Battery.
Lets set up button 1 (left) to power up/down the PiTFT – this done completely safe by activating a shutdown script. If you want to make life easier for yourself and do this via SSH (workstation) see my previous tutorial here. Open LX terminal and type the following command in:
sudo nano etc/modules
This will allow us to modify the GPIO configuration at startup, what we want is to assign Pin23 to the first button for startup/shut down; modify and uncomment EXACTLY as shown below (ignore backlight for now).
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
# Parameters can be specified after the module name.
stmpe_device cs=1 chip=stmpe610 blocks=gpio,ts irq-pullup irq-gpio=24 irq-base=330 sample-time=4 mod-12b$
gpio_backlight_device gpio=22 sudo nano /etc/modules
Press Ctrl X answer YES(y) to save and reboot:
After boot up test the button (leftmost) , press it once and your PiTFT will immediately initiate shutdown :
Test your button once again after shutdown – your Pi will now start boot up .
Hardware assembly tutorial will follow soon in the mean time look here