Skip to content

Instantly share code, notes, and snippets.

@hhromic
Last active June 15, 2020 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hhromic/f193cf444a69695a43c2db9267204d24 to your computer and use it in GitHub Desktop.
Save hhromic/f193cf444a69695a43c2db9267204d24 to your computer and use it in GitHub Desktop.
Adafruit PiTFT 2.8" Setup

Adafruit PiTFT 2.8" Setup

Last tested on: Raspbian Buster

Setup Display and HDMI

Add the following snippet to /boot/config.txt:

# Adafruit PiTFT 2.8"
dtoverlay=pitft28-resistive,speed=64000000,fps=30
disable_overscan=1
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=320 240 60 1 0 0 0

Setup raspi2fb

Install dependencies:

sudo apt update
sudo apt install cmake libbsd-dev
sudo apt clean

Clone raspi2fb repository:

git clone https://github.com/AndrewFromMelbourne/raspi2fb.git

Build and install raspi2fb:

cd raspi2fb
mkdir build
cd build
cmake ..
make
sudo make install/strip

Add --fps 30 argument to ExecStart in ../raspi2fb@.service.

Configure in systemd:

sudo cp ../raspi2fb@.service /etc/systemd/system/
sudo systemctl enable raspi2fb@1.service

Remove cloned repository:

cd ../..
rm -rf raspi2fb

Reboot 🎉

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