This Wiki page contains additional information for the “LCD-T35-480×320-RPI” from Modtronix. It is a 3.5” LCD Display with touchscreen for the Raspberry Pi. It does NOT have a HDMI port, but connects to the RPi via it's pin header.
We provide information how to get this LCD to work with the official Raspbian distribution available here.
Please note, these instructions DO NOT work with NOOBS! Even if you install Raspbian via NOOBS, it does not work!
We only provide instructions for using this LCD with the official Raspbian OS. It DOES NOT work with NOOBS! To install Raspbian:
This guide uses the scrips located at github.com/goodtft/LCD-show
It requires your RPi to be connected to the internet. You will also need a HDMI monitor, keyboard and mouse connected to your RPi.
Connect HDMI monitor, keyboard and mouse to your RPi. Start “Terminal” app, and enter following commands(one at a time):
sudo rm -rf LCD-show git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ sudo ./LCD35-show
Wait a few minutes for the script to complete. The system will restart automatically when done.
Alternatively you could also start a remote terminal via SSH, and execute commands via terminal. See Enabling SSH below for details.
For additional information, see waveshare.com/wiki/3.5inch_RPi_LCD_(A)
NOTE The touch screen X Axis seems to be reversed when using this method! If this happens, and additional command has to be executed. See “Touch Screen X Axis reversed” section below for details. Please use “Automatic” install method above if this is an issue!
This method does NOT work with NOOBS installed OS! Use with official Raspbian] only! If you prefer not to use the script based method above, the drivers can installed manually using this method(from [[https://www.raspberrypi.org/forums/viewtopic.php?t=178443|this forum post:
Enable SSH and SPI. Connect HDMI monitor, keyboard and mouse to your RPi. Start Terminal, and enter following command:
Navigate to 'Interfacing Options'(or 'Advanced options') and then enable both SPI and SSH. (Enabling SPI adds “dtparam=spi=on” to ”/boot/config.txt“ file)
Connect to your RPi using a remote terminal(no monitor, keyboard and mouse required to be connected to your RPi). See Remote access without monitor section below for details. This can be done using different methods. For example, plug an Ethernet cable into my RPi, and connect to it using WinSCP(on Windows). Then start PuTTY(Terminal) session.
Make a copy of your original “config.txt” file. Lets call the copy “config_bak.txt”:
sudo cp /boot/config.txt /boot/config_bak.txt
Open the “config.txt” file(we will use the nano editor):
sudo nano /boot/config.txt
And add following to bottom of the file (right mouse button is “paste” in PuTTY):
#For 3.5" LCD Display dtparam=spi=on dtoverlay=piscreen,speed=16000000,rotate=90
Save (Ctrl+X) and Reboot(sudo reboot).
Execute following command:
sudo apt-get install fbi
Execute following command:
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
change the line in the file:
Option “fbdev” ”/dev/fb0“
Option “fbdev” ”/dev/fb1“
Save (Ctrl+X) and Reboot(sudo reboot). After reboot, the display should now work! But, not the touch screen.
To complete the installation, create a script for touch axes:
sudo nano /etc/xdg/lxsession/LXDE/touchscreen.sh
then add these lines to the file:
DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Evdev Axes Swap' 0 DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Evdev Axis Inversion' 1 0
Close and Save file(Ctrl+X).
Make this file executable:
sudo chmod +x /etc/xdg/lxsession/LXDE/touchscreen.sh
And configure it to run at startup. Edit 'autostart' file:
sudo nano /etc/xdg/lxsession/LXDE/autostart
then before the line
@lxterminal –command ”/etc/xdg/lxsession/LXDE/touchscreen.sh“
(Before 'command' there are two –, not one -)
Close and Save file(Ctrl+X). Reboot.
If the touch screen X Axis is reversed, execute the following command:
DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' "Coordinate Transformation Matrix" -1 0 1 0 1 0 0 0 1
To Rotate screen, add following to ”/boot/config.txt“ file:
The following pages contain useful information how to get this LCD display to work:
For details, see www.raspberrypi.org/documentation/remote-access/ To connect to your RPi without a monitor, you basically need to do the following:
SSH is disabled by default on Raspbian. To enable it, connect HDMI monitor, keyboard and mouse to your RPi. Do one of the following:
On main screen, click on Raspberry icon in top, left corner of screen. Select “Preferences” –> “Raspberry Pi Configuration”. On the “Interfaces” tab, enable SSH.
Start “Terminal” app, and enter following command:
Navigate to 'Interfacing Options'(or 'Advanced options') and then enable SSH. Reboot.