MKS TS35 Guide for KlipperScreen connected to a raspberry pi via SPI : @willngton
Considering that you already have installed: Klipper + KlipperScreen using KIAUH in a clean Raspbian Lite.
cd ~
git clone [Link]
./kiauh/[Link]
#1 MKS TS35 Wiring to Raspberry PI (one may connect BEEP pin to any free gpio on PI for M300)
#2 Add the fallowing lines on your /boot/[Link], this will force screen size to match with TS35, enable
SPI and tinylcd35 dtoverlay.
###### MKS TS35
hdmi_force_hotplug=1
hdmi_cvt=hdmi_cvt=400 300 60 1 0 0 0
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
display_rotate=0
dtparam=spi=on
dtoverlay=tinylcd35,rotate=270,speed=48000000,touch,touchgpio=23 # MKS TS35
#3 Install rpi-fbcp for screen redirection.
cd ~
sudo git clone [Link]
cd rpi-fbcp/
sudo cmake ..
sudo mkdir ./rpi-fbcp/build
sudo cmake ..
sudo make
sudo install fbcp /usr/local/bin/fbcp
#4 Add "fbcp &" to /etc/[Link]
Touch Screen Configuration, this will enable touch using ADS7846
#5 If does not exists, create a file on /usr/share/X11/[Link].d/[Link] with the fallowing
content.
# This is a minimal sample config file, which can be copied to
# /etc/X11/[Link] in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/[Link] 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/A20 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
EndSection
#6 If does not exists, create a file on - /etc/X11/[Link].d/[Link] with the fallowing content.
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection
#7 Install xserver-xorg-input-evdev
sudo apt-get install xserver-xorg-input-evdev
#8 Replace tinylcd35 dtoverlay for the one found on:
[Link]
[Link]
Download and replace using the fallowing command
[Link]
sudo cp [Link].1 /boot/overlays/[Link]
#9 Reboot your system
Sources:
[Link]
[Link]