Weather Shield Hookup Guide

Contributors: Nate
Favorited Favorite 1

Weather Shield Overview

The Weather Shield is an easy to use Arduino shield that grants you access to barometric pressure, relative humidity, luminosity, and temperature. There are also connections to optional sensors such as wind speed/direction, rain gauge, and GPS for location and super accurate timing.

Weather Shield

The bare Weather Shield

Things you should know about this shield:

Suggested Reading

Hooking It Up

To get up and running with the Weather Shield you’ll need the following parts:

Weather shield with wind and rain meter

Shield on a RedBoard with optional weather meter (‘W'ind and 'R'ain cables) and GPS attached


Solder the stackable headers onto the shield, and insert the shield into your Arduino. You are welcome to solder in the RJ11 connectors to the top of the board as well. If you have the GP-635T GPS module, don’t worry about attaching it at this time, we’ll get to GPS later.

Example Firmware

To get started immediately here is a Codebender example that uses the MPL3115A2 and HTU21D libraries.

Hit connect once you’ve uploaded the example code to see the output from the Weather Shield

Arduino Files

If you are using the Arduino IDE the Weather Shield example relies on the HTU21D and MPL3115A2 libraries. Download the libraries here then install them into your Documents/Arduino folder.

Grab the example sketch, and load it onto your Arduino. Open the serial monitor at 9600bps.

You should see an output string every second containing the current weather information:





The $ and # are start and stop characters. These types of bytes are used to make it easy to parse out the data. For example, you could have an Electric Imp listen for a $ and record the data until you see a #. Once you have the string then split on the commas (also known as comma delimited), and start recording the next string.

Example with GPS

Weather Shield with GPS

Shield on a RedBoard with optional weather meter connectors and GPS attached

Attach the GP-635T GPS module using the short cable. To secure the module, there is space on the shield to attach the module using double-stick tape.

Picture of serial switch

Serial pins are connected to digital pins 4 and 5 when Serial is set to soft and are attached to the internal UART when set to hard.

There is a switch labeled Serial on the shield. This is to select which pins on the Arduino to connect the GPS to. In almost all cases the switch should be set to ‘Soft’. This will attach the GPS serial pins to digital pins 5 (TX from the GPS) and 4 (RX into the GPS).

Grab the GPS example sketch that demonstrates using the GP-635T with all the other sensors. Load it onto your Arduino, and open the serial monitor at 9600. You should see output similar to the following:




Note: The batt_lvl is indicating 4.08V. This is correct and is the actual voltage read from the Arduino powered over USB. The GPS module will add 50-80mA to the overall power consumption. If you are using a long or thin USB cable you may see significant voltage drop similar to this example. There is absolutely no harm in this! The Weather Shield runs at 3.3V and the Arduino will continue to run just fine down to about 3V. The reading is very helpful for monitoring your power source (USB, battery, solar, etc).

This example demonstrates how you can get location, altitude, and time from the GPS module. This would be helpful with weather stations that are moving such as balloon satellites, AVL, package tracking, and even static stations where you need to know precise altitude or timestamps.

Resources and Going Further

The Weather Shield example firmware outputs regular barometric pressure. This is very different from the pressure that weather stations report. For more information, see the definition of “altimeter setting pressure”. For an example of how to calculate altimeter setting type barometric pressure see the MPL3115A2 hook-up guide. Also checkout the MPL3115A2 library, specifically the BarometricHgInch example.


There’s a lot of technology on this shield. Here’s the datasheets in case you need to reference them:

Additional resources and projects to checkout: