03 juin 2016

Raspberry lcd

To configure this LCD on raspberry:
http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_LCD_Touch_Screen_SKU:363295


Start from a Raspbian jessie

Edit /boot/config.txt and add:

start_x=1
gpu_mem=128
core_freq=250
sdram_freq=400
over_voltage=0
dtparam=spi=on
dtoverlay=waveshare35a
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1

copy  waveshare35a-overlay.dtb   to /boot/overlays/waveshare35a.dtbo 
voir https://github.com/swkim01/waveshare-dtoverlays/blob/master/waveshare35a-overlay.dtb

get the package xinput-calibrator:
wget http://www.raspberrypiwiki.com/download/images/xinput-calibrator.deb

sudo DISPLAY=:0.0 xinput_calibrator

copy the result conf lines to:  /usr/share/X11/xorg.conf.d/01-input.conf

add to  01-input.conf  before end of section:
        Option "InvertX" "true"

        Option "InvertY" "true"

run raspi-config and set  boot option to "Desktop Autologin"

cat /usr/share/X11/xorg.conf.d/>> 99-fbturbo.conf 
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"

Option "SwapbuffersWait" "true"
EndSection