User Tools

Site Tools


Sidebar

Modtronix.com
Sitemap

products:lcd:raspberry-pi:lcd-3.5inch

3.5" LCD Display

3.5“ LCD

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!

Features

  • 3.5“ LCD display for the Raspberry Pi 2 and 3
  • Use SPI to communicate with RPi via pin header
  • Module dimension: 85.5mm x 55mm
  • Operating Temperature -40°C to + 85°C

Installing Drivers

We only provide instructions for using this LCD with the official Raspbian OS. It DOES NOT work with NOOBS! To install Raspbian:

Automatic(Script based) Driver Installation

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.

Additional Information

For additional information, see waveshare.com/wiki/3.5inch_RPi_LCD_(A)

Manual Driver Installation

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:

Step 1:

Enable SSH and SPI. Connect HDMI monitor, keyboard and mouse to your RPi. Start Terminal, and enter following command:

sudo raspi-config

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)

Reboot.

Step 2:

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.

Step 3:

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).

Step 4:

Execute following command:

sudo apt-get install fbi

Reboot.

Step 5:

Execute following command:

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

change the line in the file:
Option “fbdev” ”/dev/fb0“
to
Option “fbdev” ”/dev/fb1“
Save (Ctrl+X) and Reboot(sudo reboot). After reboot, the display should now work! But, not the touch screen.

Step 6:

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).

Step 7:

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
@xscreensaver -no-splash
add
@lxterminal –command ”/etc/xdg/lxsession/LXDE/touchscreen.sh“
(Before 'command' there are two –, not one -)
Close and Save file(Ctrl+X). Reboot.

Touch Screen X Axis reversed

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

Additional Settings:

To Rotate screen, add following to ”/boot/config.txt“ file:
display_rotate=1

Resources

The following pages contain useful information how to get this LCD display to work:

Trouble Shooting

Remote access without monitor

For details, see www.raspberrypi.org/documentation/remote-access/ To connect to your RPi without a monitor, you basically need to do the following:

  • Get the IP address of your RPi. See this page for details
  • Access the command line, see this page for details

Enabling SSH

SSH is disabled by default on Raspbian. To enable it, connect HDMI monitor, keyboard and mouse to your RPi. Do one of the following:

Method 1

On main screen, click on Raspberry icon in top, left corner of screen. Select “Preferences” –> “Raspberry Pi Configuration”. On the “Interfaces” tab, enable SSH.

Method 2

Start “Terminal” app, and enter following command:

sudo raspi-config

Navigate to 'Interfacing Options'(or 'Advanced options') and then enable SSH. Reboot.

products/lcd/raspberry-pi/lcd-3.5inch.txt · Last modified: 2017/10/16 22:13 by modtronix