PiTFT Weather Station

More tinkering with the wonderful Adafruit 2.8″ Touchscreen TFT module (PiTFT) for the Raspberry Pi.  This time a weather station drawing data from weather.com.

Luckily there’s a wonderful python module to extract data from three popular weather services; python-weather-api supports NOAA, Yahoo! Weather and weather.com.  This makes life so much easier.

Download the module and install in the usual way; there are instructions in their wiki.

PiTFT Weather Station

A simple way to display the raw data in a more readable form is to use Pretty Print (pprint) which is installed by default on Respbian.  Just change the code in the call to weather.com in the script below to your town which can be found in the URL if you

use the weather.com web page.

Another thing that made this project so much simpler was access to some great weather icons on the internet.  I have no artistic skill or patience for such in me.  I found some great icons produced by MerlinTheRed and available on Deviant Art.  These are free for non-commercial use.  I’ve included the copyright notice on GitHub.  The great thing about these, apart from looking good, is that the filename numbers match the icon numbers in the weather.com data!  Makes scripting the right icon so simple.

Installation & setup instructions:

  1. Install & configure your Raspberry Pi and the PiTFT using Adafruit’s fantastic instructions.
  2. Download & install the python-weather-api python module.
  3. Download & install my python daemon module.
  4. Create a directory for your weather station code.  I use /opt/PiTFTWeather/
  5. Download the script and icon images from my GitHub repository.

Start the script as root (sudo if you like):

# python PiTFTWeather.py start

Stop the script:

# python PiTFTWeather.py start

You should see a screen similar to this:

 

For more detail: PiTFT Weather Station


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut