[RaspPi] Raspberry Pi and the ili9341 Display

https://www.youtube.com/watch?v=cEcIem6R4aQ

1.) Enable SPI
# remove or comment out the spi blacklist line
sudo nano /etc/modprobe.d/raspi-blacklist.conf

2.) Install
a) FBTFT drivers as loadable modules
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
sudo shutdown -r now

OR

b) FBTFT drivers built into the kernel proper
sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update
sudo shutdown -r now

3.) Install the frame buffer driver (as root):
apt-get install xserver-xorg-video-fbdev

4.) Configure frame buffer driver:
sudo vi /usr/share/X11/xorg.conf.d/99-fbdev.conf
Section "Device"
Identifier "myfb"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection

5.) add Autostart:
( the gpios= Pins need to be changed to YOUR specification and connection! )
sudo vi /etc/modules
fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=90 bgr=1
#on my selfbuild shield
#from usb -> sd card laengs
#fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=180 bgr=1
#from cinch -> hdmi quer
#fbtft_device custom name=tm022hdh26 gpios=reset:25,led:23,dc:24 rotate=270 bgr=1

6.) add Auto login:
sudo vi /etc/inittab
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1

7.) add Autostart X:
sudo vi /etc/rc.local
su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx &"

8.) Console at boot
Add kernel argument to file /boot/cmdline.txt
fbcon=map:10

Infos taken from:
https://github.com/notro/fbtft/wiki#install
http://marcosgildavid.blogspot.de/2014/02/getting-ili9341-spi-screen-working-on.html

Video was played with this worm-of-a-command-string:
sudo mplayer -nolirc -vo fbdev2:/dev/fb1 -fs -x 320 -y 240 -zoom -framedrop -lavdopts lowres=1:fast:skiploopfilter=all ~/BadApple.avi

9 thoughts on “[RaspPi] Raspberry Pi and the ili9341 Display

  1. Hi,

    I tried for follow these step to work with my Waveshare pearspot V4 3.2 inch screen and RPi2 but no success. Any help would be greatly appreciated.

    Thanks in advance

  2. Nico, I'm able to get LCD working but not splash screen on boot.

    I followed ur instruction, but no success to make splash screen work on boot.

  3. The display would work as soon as the driver is loaded. But the rainbow splash screen of the RPi does show up before the driver is loaded. Therefore you won't see that on the display.

  4. Ok what I'm saying is that LCD work perfectly.

    I tried to flow your tutorial for splash screen but not able to make splash screen work. If can help with that.

  5. I am sorry I do not understand what you mean by splash screen.
    This tutorial here is only to get the screen working, nothing more. And as you already said, you achieved that, which is great.

    What other tutorial are you refering too? 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.