Lightbullet

Home
News
ESP8266
Raspberry Pi
Bifferboard
JAL
Source code
Download
Links
Contact
 

Raspberry Pi

weather2lcd


The weather2lcd project is about displaying the weather information on a 16x2 LCD display, connected to a Raspberry Pi. The weather2lcd program, running on the Raspberry Pi, downloads a METAR text file from the NOAA website http://weather.noaa.gov/pub/data/observations/metar/stations and parses the content into all available weather information, like temperature and humidity. Currently the display is showing the time of measurement, windspeed, humidty, pressure, temperature and windirection.

weather2lcd setup

For this project I will be using the next parts:

  • Raspberry Pi model B rev.2
  • Breadboard
  • HD44780 3.3V 16x2 LCD
  • 1KΩ potentiometer
  • 2x 680Ω resistors or one 220Ω resistor
  • Connection wires

The diagram below shows how to wire the 16x2 LCD to the header of the Raspberry Pi. I'm using an old version of the Raspberry Pi, but a newer model will do also.

weather2lcd breadbord

The program to display the weather information is located on the Github project site https://github.com/lightbullet/raspberrypi

Run the following commands to download, compile and install the program on the Raspberry Pi.

pi@raspberrypi1:~ $ git clone https://github.com/lightbullet/raspberrypi.git
pi@raspberrypi1:~ $ cd raspberrypi/weather2lcd
pi@raspberrypi1:~ $ make
pi@raspberrypi1:~ $ sudo make install

To change the current location to your location, replace the "EHRD" text in weather2lcd.c for your METAR station.

To update the information on the display, add the following line to crontab pi@raspberrypi1:~ $ crontab –e Add the line 5,35 * * * * /usr/local/bin/weather2lcd and save.

Now everything should be up and running!