DYNAMIC BADGE/LABEL:

Enable SPI Inteface: sudo raspi-config

Install libraries:

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz

tar zxvf bcm2835-1.60.tar.gz

cd bcm2835-1.60/

sudo ./configure

sudo make

sudo make check

sudo make install

Install WiringPi libraries

sudo apt-get install wiringpi


#For Pi 4, you need to update it:

cd /tmp

wget https://project-downloads.drogon.net/wiringpi-latest.deb

sudo dpkg -i wiringpi-latest.deb

gpio -v

#You will get 2.52 information if you install it correctly

Install Python Libraries

#python2

sudo apt-get update

sudo apt-get install python-pip

sudo apt-get install python-pil

sudo apt-get install python-numpy

sudo pip install RPi.GPIO

sudo pip install spidev

#python3

sudo apt-get update

sudo apt-get install python3-pip

sudo apt-get install python3-pil

sudo apt-get install python3-numpy

sudo pip3 install RPi.GPIO

sudo pip3 install spidev

https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT=]