WeatherPiArduino Weather Board – Version 2


Comments are now closed.   Please go to the Product Support Forum in the menu.

Version 1 product page is here.

How to Buy SwitchDoc Labs Products

United States and Worldwide: SwitchDoc Labs Store 

Another Choice Within United States: (Free Shipping with Amazon Prime!)

 Note:    For the latest information and specifications, go to the product page on

Note:   There is a new version of the WeatherPiArduino available:  The Weather Board.

The WeatherPiArduino Weather board is now available and in stock!

WeatherRack Weather Sensors now available.

Outdoor Temperature and Humidity Sensors now available.

IMG_9861WeatherPiArduino is a weather station controller board designed to interface to Arduino and Raspberry Pi computers.  It is an interface board developed by SwitchDoc Labs to allow the user to easily build a fully functioned Weather Station while allowing customization of functions.

WeatherPiArduino is derived from Project Curacao.  Generation 1 of this board was deployed and tested in Curacao before Generation 2 was released to production.  The full WeatherPiArduino article was published in Raspberry Pi Geek magazine in September, 2014 and a follow up article has been published in April, 2015 (including the new lightning detector).  The WeatherPiArduino comes with a SwitchDoc Labs DS3231/EEPROM board.

WeatherPiArduino with Included DS3231/EEPROM

WeatherPiArduino with Included DS3231/EEPROM

Combine the WeatherPiArduino with a SunAir or SunAirPlus board to create a solar powered weather station.

Software for WeatherPiArduino Board

Arduino Software is here.

Arduino Software for the WeatherRack and WeatherPiArduino is here.

Raspberry Pi Software is here.

WeatherRack Software is here.

What are Grove Connectors?

Grove connectors are standardized plugs for connecting devices together easily and without soldering.  See our Full Grove Tutorial here.

Grove Connectors

IMG_9861 copy


WeatherPiArduino in Solar Powered WeatherPi

WeatherPiArduino in Solar Powered WeatherPi

You can download the Full WeatherPiArduino Product V2 Specification here  (Note:   The Arduino Mega Fritzing diagram in the specification has a mistake.  The line from the WeatherPiArduino should plug into GPIO 18 on the Arduino Mega board and NOT GPIO 5 as shown!).


The Version 1 WeatherPiArduino Product V2 Specification is here.


WeatherPiArduino Fully Populated

WeatherPiArduino Fully Populated

Block Diagram

SDL Grove

It was specifically designed to interface with the SwitchDoc WeatherRack, ArgentData Weather Sensors,  SparkFun Weather Meters SEN-08942 along with auxiliary I2C units.

Fritzing Diagrams

(Note:   The Arduino Mega Fritzing diagram has a mistake.  The line from the WeatherPiArduino should plug into GPIO 18 on the Arduino Mega board and NOT GPIO 5 as shown!  On the Pi connection diagram, the pink line is NOT needed.   GPIO17 is for connecting to the external Dual WatchDog timer.   Why we have it connected to A2 of the ADS1015 ADC is beyond us in that diagram. )


WPA-ArduinoUNO_bbLogo WPA-RaspberryPiB+_bbLogo WPA-ArduinoMega_bbLogo


Interfaces on WeatherPiArduino Board

  • I2C for Raspberry Pi
  • I2C for Arduino
  • RJ11 Plugs installed for SwitchDoc Labs WeatherRack, etc.
  • Wind Vane, Rain Bucket, Anemometer computer connections for Raspberry Pi and Arduino

I2C devices Included with the WeatherPiArduino Board

Plug in I2C Interfaces provided

  • Embedded Adventures I2C Lightning Detector MOD-1016 board
  • Adafruit HTU21D-F Temperature/Humidity breakout board
  • Adafruit 32KB FRAM I2C breakout board
  • Adafruit ADS1015 4 Channel A/D I2C board

I2C Device Specifications

BMP280 (Barometer / Temperature)

DS3231 (Real Time Clock)


ADS1015 (12 bit ADC)

AS3935 (MOD-1016 – Lightning Detector)

HTU21D-F (Humidity)

FRAM (32KB Fast Non-Volatile Storage)


SwitchDoc Labs has now released the first version of the Arduino C++ Class software for the WeatherPiArduino board.   You can find it here on the switchdoclabs github.  The Raspberry Pi Pure Python Software is here.

Version 1.0 contains support for the WeatherRack Sensors.

This board will interface with both the Raspberry Pi and the Arduino.  The Arduino software library has now been released.  The Raspberry Pi software is now released.

The SDL_Weather_80422 class library for Arduino is located on github at

Want to build a control panel for the WeatherPiArduino?  Look at this post and the picture below:

WeatherPiArduino RasPiConnect

WeatherPiArduino RasPiConnect Control Panel


SwitchDoc Labs WeatherRack Sensors

The SDL_Weather_80422 class library is designed to provide all the functions of the SwitchDoc WeatherRack, ArgentData Weather Sensors,  SparkFun Weather Meters SEN-08942 in one C++ class.

The library is easy to use and hides the complexity of the interface to the sensors.  The C++ class has two Interrupt Service Routines (ISR), one each for the anemometer and the rain bucket.  The wind vane is connected to an Analog to Digital Converter (ADC) input pin on the Arduino.  Note that the C++ class is designed to be a singleton, in other words, you only can interface one sensor package without some additional work (mostly involving Interrupts).  The article in Raspberry Pi Geek magazine discusses this in detail.

There are two main modes for the class.


SDL_MODE_SAMPLE mode means return immediately after asking for the wind speed. The wind speed is averaged at sampleTime or since you last asked, whichever is longer. If the sample time has not passed since the last call, the class returns the last calculated wind speed. That means that you will never see changes faster than the specified sample time. This allows you to not wait for the wind speed, you can just grab the last valid reading.


SDL_MODE_DELAY mode means to wait for the set sample time to expire and return the average wind speed at the expiration. You would use this if you want to make sure you have the latest value and your program architecture allows you to pause for the sample time before continuing. Which mode you use depends on the specific software architecture of your Arduino application.

Typically, I use SDL_MODE_SAMPLE because I can tolerate not having a current value of wind speed.

The example code for the SDL_Weather_80422 library is shown below:

SDL_Weather_80422_Library.ino - Example for using SDL_Weather_80422 Library
For SwitchDoc Labs WeatherRack 
Weather Sensor Assembly 80422 Argent Data Systems
Created by SwitchDoc Labs July 27, 2014.
Released into the public domain.

#include "SDL_Weather_80422.h"

#define pinLED 13 // LED connected to digital pin 13
#define pinAnem 18 // Anenometer connected to pin 18 - Int 5
#define pinRain 2 
#define intAnem 5
#define intRain 0

// for mega, have to use Port B - only Port B works.
Arduino Pins PORT
------------ ----
Digital 0-7 D
Digital 8-13 B
Analog 0-5 C

// initialize SDL_Weather_80422 library
SDL_Weather_80422 weatherStation(pinAnem, pinRain, intAnem, intRain, A0, SDL_MODE_INTERNAL_AD);

uint8_t i;

float currentWindSpeed;
float currentWindGust;
float totalRain;
void setup()

Serial.println("WeatherPiArduino SDL_Weather_80422 Class Test");
Serial.println("Version 1.0");

weatherStation.setWindMode(SDL_MODE_SAMPLE, 5.0);
//weatherStation.setWindMode(SDL_MODE_DELAY, 5.0);
totalRain = 0.0;

void loop()

currentWindSpeed = weatherStation.current_wind_speed()/1.6;
currentWindGust = weatherStation.get_wind_gust()/1.6;
totalRain = totalRain + weatherStation.get_current_rain_total()/25.4;
Serial.print(""" wind_speed=");
Serial.print("MPH wind_gust=");
Serial.print("MPH wind_direction=");



When you run this, you should get a result similar to this:


WeatherArduino SDL_Weather_80422 Class Test
Version 1.0

rain_total=0.00 wind_speed=13.20MPH wind_gust=12.40MPH wind_direction=90.00
rain_total=0.00 wind_speed=9.60MPH wind_gust=9.48MPH wind_direction=90.00
rain_total=0.00 wind_speed=10.20MPH wind_gust=9.23MPH wind_direction=90.00
rain_total=0.00 wind_speed=11.10MPH wind_gust=9.84MPH wind_direction=90.00
%d bloggers like this: