[RaspPi] Raspberry Pi and the ili9341 Display

Raspberry Pi - Bad Apple on ili9341 Display

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 >/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
Built with Hugo
Theme Stack designed by Jimmy