Pocket Adventures.com
by John Till

Products| Guides| 3D Models|

Setting up an ILI9341 SPI Display

These instructions are inspired by this Sudomod forum post.

Change a couple of options in the Raspberry Pi configuration:
sudo raspi-config
In the Advanced Options:
Disable Overscan
In the Interfacing Options: Enable SPI
Exit raspi-config and restart the device.
sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24 speed=90000000 rotate=90 fps=60 bgr=1
con2fbmap 1 1 sudo nano /etc/modules
Enter the following two lines below what is already there:
spi-bcm2835
fbtft_device
Save the changes by pressing Ctrl-X, Y, Enter.

Next, create the SPI configuration:
sudo nano /etc/modprobe.d/fbtft.conf
Enter the following line:
options fbtft_device name=fb_ili9341 gpios=reset:25,dc:24 speed=90000000 rotate=90 fps=60 bgr=1 custom=1
Save the change by pressing Ctrl-X, Y, Enter.
Restart the device.

Finally, install fbcp. (You can learn more about it here.)
sudo apt-get install cmake
git clone https://github.com/tasanakorn/rpi-fbcp
cd rpi-fbcp/
mkdir build
cd build
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp
To test it, type "fbcp" and press Enter.

Now, it's time to add it to the device startup:
sudo nano /etc/rc.local
JUST BEFORE the exit 0 line, add the following line:
fbcp &
Save the change by pressing Ctrl-X, Y, Enter.




Copyright © 2019 Pocket Adventures.com