Prepare the Pi!
Before you begin, its a good idea to get your Pi completely updated and upgraded. We assume you have burned an SD card and can log into the console to install stuff.
Run the following to update the operating system:
sudo apt update -y sudo apt upgrade -y
Run Python Installation Script
A Python script is used to install the kernel module support software. This will need a few additional Python packages. Also, if you are installing on the Bookworm version of Raspberry Pi OS or later, you will need to install your Python modules in a virtual environment. You can find more information in theĀ Python Virtual Environment Usage on Raspberry Pi guide.
First, let's make sure the necessary operating system packages are installed by running:
sudo apt-get install -y git python3-venv python3-pip
Next create a virtual environment named env, located in the home directory, and activate it by running the following commands:
cd ~ python -m venv env --system-site-packages source env/bin/activate
Once the virtual environment is activated, install some other required Python modules (used by the install script) with the following:
pip3 install --upgrade adafruit-python-shell click
Now we can download and run the Python installation script. To do so, run the following commands:
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git cd Raspberry-Pi-Installer-Scripts sudo -E env PATH=$PATH python3 adafruit-pitft.py --display=st7789v_bonnet_240x240 --rotate=0 --install-type=console
When you get asked to reboot, reboot!
Zat's it! You will now have the miniPiTFT with a console display on it
Uninstall Kernel Module
The same Python script can be used to uninstall the kernel module. Run it with the following command options:
sudo -E env PATH=$PATH python3 adafruit-pitft.py --install-type=uninstall
Page last edited December 04, 2024
Text editor powered by tinymce.