Skip to content

Instantly share code, notes, and snippets.

@lbussy
Last active November 8, 2020 16:06
Show Gist options
  • Save lbussy/82071225a47626584f7976a187dea3ac to your computer and use it in GitHub Desktop.
Save lbussy/82071225a47626584f7976a187dea3ac to your computer and use it in GitHub Desktop.
Enable Raspberry Pi 480x320 Touch Screen

Originally posted here.

I have the screen purchased here. I am using Raspbian Buster dated 09-26 and have had no issues. I followed these instructions which were on the Amazon item page:

sudo rm -rf LCD-show
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./MHS35-show

Note: I think that a fresh Raspbian Lite installation does not have Git. If you get an error saying -bash: git: command not found in step two above, do this step first and then re-do step 2:

sudo apt install git

The process proceeds as follows:

pi@raspberrypi:~ $ sudo rm -rf LCD-show
pi@raspberrypi:~ $ git clone https://github.com/goodtft/LCD-show.git
Cloning into 'LCD-show'...
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 1186 (delta 15), reused 14 (delta 6), pack-reused 1160
Receiving objects: 100% (1186/1186), 758.18 KiB | 2.18 MiB/s, done.
Resolving deltas: 100% (778/778), done.
pi@raspberrypi:~ $ chmod -R 755 LCD-show
pi@raspberrypi:~ $ cd LCD-show/
pi@raspberrypi:~/LCD-show $ sudo ./MHS35-show
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.20.1-2).
The following additional packages will be installed:
  cmake-data libjsoncpp1 librhash0
Suggested packages:
  cmake-doc ninja-build
The following NEW packages will be installed:
  cmake cmake-data libjsoncpp1 librhash0
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,233 kB of archives.
After this operation, 21.6 MB of additional disk space will be used.
Get:1 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf cmake-data all 3.13.4-1 [1,476 kB]
Get:2 http://raspbian.mirror.constant.com/raspbian buster/main armhf libjsoncpp1 armhf 1.7.4-3 [66.2 kB]
Get:3 http://raspbian.mirror.constant.com/raspbian buster/main armhf librhash0 armhf 1.3.8-1 [132 kB]
Get:4 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf cmake armhf 3.13.4-1 [2,559 kB]
Fetched 4,233 kB in 3s (1,330 kB/s)
Selecting previously unselected package cmake-data.
(Reading database ... 155838 files and directories currently installed.)
Preparing to unpack .../cmake-data_3.13.4-1_all.deb ...
Unpacking cmake-data (3.13.4-1) ...
Selecting previously unselected package libjsoncpp1:armhf.
Preparing to unpack .../libjsoncpp1_1.7.4-3_armhf.deb ...
Unpacking libjsoncpp1:armhf (1.7.4-3) ...
Selecting previously unselected package librhash0:armhf.
Preparing to unpack .../librhash0_1.3.8-1_armhf.deb ...
Unpacking librhash0:armhf (1.3.8-1) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.13.4-1_armhf.deb ...
Unpacking cmake (3.13.4-1) ...
Setting up librhash0:armhf (1.3.8-1) ...
Setting up cmake-data (3.13.4-1) ...
Setting up libjsoncpp1:armhf (1.7.4-3) ...
Setting up cmake (3.13.4-1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...

Cloning into 'rpi-fbcp'...
remote: Enumerating objects: 61, done.
remote: Total 61 (delta 0), reused 0 (delta 0), pack-reused 61
Unpacking objects: 100% (61/61), done.
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/LCD-show/rpi-fbcp/build
Scanning dependencies of target fbcp
[ 50%] Building C object CMakeFiles/fbcp.dir/main.c.o
[100%] Linking C executable fbcp
[100%] Built target fbcp
2019
need to update touch configuration
Selecting previously unselected package xserver-xorg-input-evdev.
(Reading database ... 158401 files and directories currently installed.)
Preparing to unpack .../xserver-xorg-input-evdev_1%3a2.10.6-1+b1_armhf.deb ...
Unpacking xserver-xorg-input-evdev (1:2.10.6-1+b1) ...
Setting up xserver-xorg-input-evdev (1:2.10.6-1+b1) ...
Processing triggers for man-db (2.8.5-2) ...

reboot now

After reboot, the screen works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment