Raspberry Pi 3.5 inch LCD

Rotate display

  sudo nano /boot/config.txt

Change the parameter as follow:
(Rotate 90)

  dtoverlay=waveshare35a -> dtoverlay=waveshare35a:rotate=180

(Rotate 180)

  dtoverlay=waveshare35a -> dtoverlay=waveshare35a:rotate=270

(Rotate 270)

  dtoverlay=waveshare35a -> dtoverlay=waveshare35a:rotate=0

Rotate touch

  sudo nano /etc/X11/xorg.conf.d/99-calibration.conf

Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
Change as follow:
(Rotate 90)

  Section "InputClass"
  Identifier "calibration"
  MatchProduct "ADS7846 Touchscreen"
  Option "Calibration" "3932 300 3801 294 "
  Option "SwapAxes" "0"
  EndSection

(Rotate 180)

  Section "InputClass"
  Identifier "calibration"
  MatchProduct "ADS7846 Touchscreen"
  Option "Calibration" " 300 3932 3801 294 "
  Option "SwapAxes" "1"
  EndSection

(Rotate 270)

  Section "InputClass"
  Identifier "calibration"
  MatchProduct "ADS7846 Touchscreen"
  Option "Calibration" " 300 3932 294 3801 "
  Option "SwapAxes" "0"
  EndSection

Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit. On the Terminal, enter

  sudo reboot

Aus GitHub

Here are the steps that I took to get it working. The screen should start working at step 5 when you do the test.

1.Expand the filesystem

 sudo raspi-config

2.Change fb0 to fb1

 sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

3.Enable SPI if needed

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

4.FBTFT drivers as loadable modules

 sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
 sudo reboot

5.Test

 sudo modprobe flexfb  width=320  height=480  regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
 sudo modprobe fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24

6.Perminantly add Driver

 #Add to file /etc/modules
 flexfb  width=320  height=480  regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-,0xC5,0x00,0x00,0x00,0x00,-,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
 fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24

7.Additional settings

 #config.txt
 gpu_mem=128
 #cmdline.txt
 fbcon=map:1 fbcon=font:ProFont6x11

hier