Introduction: Weather Station on the Web!

I have studied meteorology in the university. It's been a long time since I dealt with it. However, it's very dear to my heart. I bought an arduino kit and played with the boys. Then I bought a weather shield. It printed the measurements to the serial. My oldest said: let us display it with the LCD! That was great. Then I decided I want to send the data over as a Personal Weather Station (PWS) to weather underground, a great weather website, where everyone can see how hot it is!

Step 1: Materials

An Arduino uno r3 or Sparkfun redboard

An Arduino Mega

A CC3000 Sparkfun weather shield

Sparkfun weather shield

About 20 wires like those one uses with a breadboard

A breadboard


A 330 Ohm resistor

2x Arduino stackable headers kit - a kit for the weather shield and a kit for the mega

A square USB connector.

Mini USB connector.

5V power adapter with a USB socket.


Solder and soldering iron.

Step 2: Soldering

Carefully solder the headers to each shield.

Consult the hookup guides:

And be careful as the soldering iron is very hot!

Step 3: Connections + Software

Attach the weather shield on the Uno.

Download the relevant supporting software and install it. (Two libraries, one for the pressure-temperature sendor, the other for the humidity sensor).

Now we can run the Uno with the weather shield.


you can download the little software, based on Sparkfun demo sketeches, and a PDF file to help with the wiring.

There are three files in the WeatherStation git:

Weather_Shield4.ino - the sketch running on the Arduino Uno.

ConnectionTest1MEGA.ino - the sketch running on the Mega.

wiring.pdf - details on the wiring.

Friting is here:

PNG image:

Step 4: Running the Uno

Connect the Uno (carrying the weather shield on its back) and load it with the sketch called Weather_Shield4.ino.

Open the serial monitor of the IDE. You should see a reading every 20 seconds, like:


The Uno measures every 20 seconds anfd sends to the Mega via the serial.

Step 5: Sorting the Mega

The Mega receives the weather data from the Uno and transmits it on the web for weather underground.

Download & install the WiFi library:

I never saw the Uno get stuck with this shield and sketch. The Mega, however, may lose the WiFi connection, fail to upload, so I set in a booting mechanism. If things go wrong it just crashes itself and starts afresh.

The normal scenario is that it parses the serial data from the Uno and transmits it.

You have to modify the Mega sketch.

Download this:

These are the fields you have to modify:

char ap_ssid[] = "NETWORK SSDID (NAME)"; // SSID of network

Here you have to fill in your WiFi network name. Just how you see it on your phone or computer.

char ap_password[] = "NETWORK PASSWORD"; // Password of network

Your network's password.

This is fine to connect to to the web, but you have to create a PWS in WeatherUnderground.

You register here:

Just give the co-ordinates and get a station ID and password.

These you put here:

const char mywsname[] = "WEATHER STATION ID";
const char mywspass[] = "WEATHER STATION PASSWORD";

Step 6: Upload the Sketch to the Mega

Now, after you have edited the sketch of the mega, upload it to the Mega.

disconnect both 'inos from the electricity and wire up everything.

Use the PDF file in

The Mega supplies electricity to the Uno.

After connecting everything, power the Mega.

In a short time you'll be able to see you data online. Also, in each round the LED blinks twice. so you know you are fine.

Weather underground notify you when your stations starts or stops...

I calculate the dew point using the temperature and humidity by using the formula of Prof. Brian McNoldy

of the University of Miami.

I thank him a lot.

Good luck!

P.S. #1

I don't transmit the pressure data as my sensor is faulty. You can enable it easy peasy. Just uncomment a few lines of code.

P.S. #2

You may want to automatically query your weather data. There are free programmes in Weather Underground. You can download the data, periodically, in a JSON format and plot it or whatever.

Here's a small python script that can do the job for you:

Just get an API key from Weather Underground.