Skip to content
Eugene Andruszczenko edited this page Mar 5, 2018 · 1 revision

Step 3

Automate the above on startup

Open the modules file

sudo nano /etc/modules

Add these lines to the bottom

spi-bcm2835
fbtft_device

Hit 'CTRL+X' and 'Y' to confirm the save

Create a configuration file for the TFT LCD Module

This will create an empty file named fbtft.conf

sudo nano /etc/modprobe.d/fbtft.conf

Add this line to the empty file

options fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24 speed=80000000 fps=60 bgr=1 rotate=90 custom=1

Hit 'CTRL+X' and 'Y' to confirm the save

Installing the Framebuffer Copy tool

The following lines will download and install the Frambuffer Copy tool in a folder in the root directory

cd
sudo apt-get install cmake
git clone https://github.com/tasanakorn/rpi-fbcp fbcp
cd fbcp/
mkdir build
cd build/
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp
fbcp

Hit CTRL+C to exit 'fbcp'

Add Framebuffer Copy to our boot sequence

In order to have a command or program run when the Pi boots we will edit the 'rc.local' file

sudo nano /etc/rc.local

Add the following just before the exit 0 line

fbcp&

Hit 'CTRL+X' and 'Y' to confirm the save

Your file (if you have no other commands running) will look something like this

### replace with this
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

fbcp&

exit 0