Install PADD

Next we're going to install PADD, the Pi-hole Ad Detection Display. This application displays statistics about advertisements, your Pi's status, network configuration and system statistics on your PiTFT.

It is written and maintained by Jim McKenna who did an awesome job!

In the SSH session with your Pi, navigate to your home directory:

Download: file
cd ~

Grab a copy of PADD:

Download: file
wget -N https://raw.githubusercontent.com/jpmck/PADD/master/padd.sh

Make PADD executable by running:

Download: file
sudo chmod +x padd.sh

Open PADD at Pi Bootup

Next, we're going to set PADD to open automatically on your PiTFT when we start our Pi.

Open ~/.bashrc:

Download: file
nano ~/.bashrc

Navigate to the end of the file (by pressing the down arrow key) and add the following text:

Download: file
# Run PADD
# If we're on the PiTFT screen (ssh is xterm)
if [ "$TERM" == "linux" ] ; then
  while :
  do
    ./padd.sh
    sleep 1
  done
fi

Save (control+O) the configuration and exit (control+X) nano to be brought back to the terminal.

Turn off the PiTFT at Night

The PiTFT is bright and doesn't need to be powered-on at night, so let's put it to sleep until we wake up.

Edit cron as root:

Download: file
sudo crontab -e

Select nano as an editor by pressing the key. 

Scroll beneath the commented text (#) and enter the following:

Download: file
# PADD Sleep
# Turn off the PiTFT+ at midnight
00 00 * * * sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
# Turn on the PiTFT+ at 8:00 am
00 08 * * * sh -c 'echo "1" > /sys/class/backlight/soc\:backlight/brightness'

Save (control+O) the configuration and exit (control+X) nano to be brought back to the terminal.

Reboot the Pi to apply the new changes by running:

Download: file
sudo reboot

When your Pi reboots, the TFT should boot into PADD:

After PADD starts, it should go into display mode. If your PADD is displaying statistics about your network, congrats! We're all set up and ready to test our advertisement-blocking-pi.

Smaller Pi Displays

You can also use this guide with smaller displays, like the PiTFT 2.8". The full PADD display is unsupported by this screen - but don't worry - it'll automatically display a smaller, mini PADD interface. 

This guide was first published on Jun 28, 2018. It was last updated on Jun 28, 2018. This page (Install PADD) was last updated on Oct 03, 2018.