<< Summary

SwitchDocLabs WeatherStation from a Raspberry PI, in Java Raspberry PI

The WeatherPiArduino Weather Board is described here.

It requires an ADS1015 for the Wind Direction (I2C ADC, address 0x48).
It has an integrated BMP180 (I2C, address 0x77).
The Fritzing schema provided by SwitchDocLabs looks like this:

Click to enlarge

Orange & Yellow wires are the I2C ones (SDA, SCL), used by the ADS1015 & the BMP180, at least.
Gray and ochre ones can use any GPIO pin of the Raspberry PI's header, they will be used for the Wind Speed (ochre) and the Rain flow (gray).
In the diagram: Those 2 pins will be used by the init method of the class weatherstation.SDLWeather80422.

    final Pin ANEMOMETER_PIN = RaspiPin.GPIO_16; // <- WiringPi number. GPIO 15, #10
    final Pin RAIN_PIN       = RaspiPin.GPIO_01; // <- WiringPi number. GPIO 18, #12
    SDLWeather80422 weatherStation = new SDLWeather80422(ANEMOMETER_PIN, RAIN_PIN, AdcMode.SDL_MODE_I2C_ADS1015);
    weatherStation.setWindMode(SdlMode.SAMPLE, 5);

Those pins will be used to count the 'ticks' emitted by the anemometer, and the pluviometer.
The number of ticks is counted by a listener on that pin. A tick is an occurrence of the pin turned from low to high.

It works at least with the Raspberry PIs B, B+, A+, and B2.

It is easy from this kind of code to feed a WebSocket server (running on the RPi, even an A+ can run nodejs, without feeling it) and render the data to whoever can get connected on its network:

Click to enlarge

There is also an HTML5 rendering of the same data:

Click to enlarge
Real time data. You have to be in the same wireless network as the Raspberry PI.
This is where an Internet Of Things (IoT) server can be an asset. See the Photon section about that.

Click to enlarge
Mounted on its acrylic plate, with a Raspberry PI A+.

Click to enlarge
First presentation on the roof, Ocean Beach, San Francisco, CA.
Notice the hatch in the roof, made for the occasion...
Click to enlarge
With a "housing" for the Raspberry PI ;)

Click to enlarge
A rendering of the data logged by the Raspberry PI.
Accessible live from here.

A Photon in the picture

The Photon is a small and cheap IoT board provided by Particle. The cool thing is that is also includes access to a server that can be used in a real-time mode, from anywhere on the Internet.
The project also contains a Photon sketch (weather-station-http-client.ino) that runs on a Photon. It pings the Raspberry PI to get the data (the node server running on the Raspberry PI can return a json object that represents the currant situation), and feeds the Particle IoT server.

Click to enlarge Click to enlarge

This page displays a rendering if those live data. As you can tell, it does not require to be on the same network as the Raspberry PI. The Internet is good enough to host that thing.

Oliv did it