|
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-configIn 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=1Enter the following two lines below what is already there: spi-bcm2835 fbtft_deviceSave the changes by pressing Ctrl-X, Y, Enter. Next, create the SPI configuration: sudo nano /etc/modprobe.d/fbtft.confEnter the following line: options fbtft_device name=fb_ili9341 gpios=reset:25,dc:24 speed=90000000 rotate=90 fps=60 bgr=1 custom=1Save 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/fbcpTo test it, type "fbcp" and press Enter. Now, it's time to add it to the device startup: sudo nano /etc/rc.localJUST BEFORE the exit 0 line, add the following line: fbcp &Save the change by pressing Ctrl-X, Y, Enter. |