Introduction: Google Weather on Graphical Display With Arduino

Picture of Google Weather on Graphical Display With Arduino

In this project, I am using an Arduino board to show forecast of the weather from Google Weather service on a VGA screen. The display is obviously graphical one, with icons and some colorful text. It is one of those gadgets I wanted to have for some time now – A weather forecasting display that is there just like the wall clock. Yes I know you got nicer looking things on your angry-birds machine... I simply enjoy doing it myself. Had some challenges to overcome, like Arduino has only 2KB of RAM limitation, pretty small for parsing XML data…

• Current and Forecast weather information graphically displayed
• Time display from the internet, using NTP protocol
• Does not require any PC to be involved
• Indoor temperature and humidity display
• Easy to connect and assembly, only Ethernet cable and power
• Supports DHCP for network connection
• Supports both VGA screens and small 3.2" screens
• Daylight-Saving support through a user button

Some more features include change of background color between night and day for the clocks and change background color of the weather data areas depending on temperatures.

I have a newer version of this at

Step 1: What Is Required to Build This Gadget?

Picture of What Is Required to Build This Gadget?

1. Arduino Ethernet Pro ( or Arduino with Ethernet Shield
2. 4D Systems display (uLCD-32PT) or display adaptor (uVGA II)
3. Arduino I/O headers socket
4. 5x Jumper wires (only 4 required for operation), note the display and display adaptor have male pins and Arduino typically takes female headers.
5. 2GB or less micro-SD (only needs about 150KB)
6. Power Supply
7. Ethernet Cable
8. DHT-22 Temperature and humidity sensor (optional, only if you want indoor temp)
9. Push button (optional)
10. 2x 10K Ohm resistor (optional, only if you want indoor temp)

Also for building the gadget, you will need the following
1. FTDI board, better use 5Volts one like this one.
2. PC for programming
3. A micro-SD reader device
4. Soldering Iron

Step 2: Where to Buy?

Picture of Where to Buy?

All of the items can be purchased at Sparkfun or your favorite electronic components store. As for the display or display adaptor, they come pre-loaded with one of the firmware types SGC or GFX. It doesn't really matter which one you buy, as converting from one firmware flavor to the other is very simple task performed by a tool on the PC.

Step 3: How to Assembly?

Picture of How to Assembly?

Please read this thoroughly as there could be notes on changes that you might want to do.
1. After purchasing the goods, download software to your PC including:
a. Arduino IDE (I use version 022)
b. 4D Systems tools for programming their adaptors or displays from
c. Arduino libraries including: NewSoftwareSerial, Arduino Time Library, Ethernet Library
2. Connect your display or display adaptor to the FTDI (Vcc to 5V, GND to GND, Rx to Tx and Tx to Rx, DTR on the FTDI to Reset pin) and the FTDI to USB on your PC
3. Upload the right firmware onto the LCD using PmmC Loader tool from 4D Systems (you need the GFX version)
4. Open the 4D systems Workshop tool; open the program file in the code\4D subdirectory of the ZIP file in this publication. Follow the steps as also shown in the picture for this tool to:
a. Select the right display or adaptor model
b. Select the right COM port (the one the FTDI generates)
c. Select destination as "Flash" and not "Ram" (don't forget this!)
d. Compile and Load the program to the display/adaptor
5. Place all the necessary Arduino libraries in the right location (if do not exist already)
6. Connect your Arduino to PC
7. Edit the Arduino files to match your time zone and place
a. Edit the file NTPAndTime.cpp and change variable timeZoneSeconds to reflect the difference of your time zone from GMT. If you are west to GMT then use negative values.
b. Change the variable dsSeconds to reflect the standard change from your time-zone
c. Edit the file NetArduino.pde and change the variable weatherDataGetString to match you location (change Tel-Aviv to be your city). I recommend checking in the browser that it works by typing: in your browser address field. You should see some XML reply in return if that works.
8. Open the Arduino sketch NetArduino.pde, compile and load the program to your Arduino
9. Connect your micro-SD reader to your PC with the micro-SD in it
10. Save all the files from the microSD subdirectory into the root directory of the micro-SD
11. Safely remove the micro-SD from the reader and place it in the display or display adaptor
12. Disconnect the display and Arduino from PC
13. Connect the display or display adaptor to your Arduino as following:
a. Vcc of the display/adaptor to +5V of Arduino
b. GND of the display/adaptor to one of the Arduino GND connections
c. Connect the Digital I/O pin 5 of Arduino to Rx pin (3rd pin from the right on the adaptor when VGA connector is on the top)
d. Connect the Digital I/O pin 4 of Arduino to Tx pin (2nd pin from the right on the adaptor)
14. Build a small circuit for the push button (see optional DHT sensor circuit too for schema) as following:
a. Push button connects to Vcc on one side and to resistor of 10K ohm on the other side.
b. Other side of the resistor connected to ground
c. Connect Arduino pin 2 to resistor/push-button junction
15. Connect the Ethernet cable to the Arduino
16. Connect the VGA display to the adaptor if you chose to use adaptor
17. Connect power supply to Arduino
18. Enjoy the weather

Step 4: Completing the Assembly

Picture of Completing the Assembly

If you also want the indoor temperature and humidity, follow these steps:
1. Build a small circuit with DHT22, Vcc goes to Arduino Vcc, GND to the Arduino GND and a 10K Ohm resistor from Vcc to the data pin.
2. Connect the data-pin of DHT22 to pin 3 of the Arduino

Step 5: Are You Using Celsius or Fahrenheit?

This program displays temperatures in Celsius. If however you are using Fahrenheit degrees, here are the changes you need to do (pretty simple)
1. Edit the 4GL display program file and change the function ShowCelsiusSymbol and change putstr("C"); to putstr("F");
2. Change the thresholds of temperatures for Hot and Cold indicators (TEMP_THHOT and TEMP_THCOLD constants) to what you think is good for you (89 and 68 is the equivalents of my current Celsius settings)
3. Edit the Arduino file NetArduino.pde and change the function _ProcessWeatherXMLLine so that instead of the line:
if ((location = matchXmlTag(ptr, PSTR("<temp_c data="))) != 0)
You will have
if ((location = matchXmlTag(ptr, PSTR("<temp_f data="))) != 0).
That is take the XML tag temp_f instead of temp_c
4. Change the function Far2Cel in the same file to basically return t; instead of all the lines in there.
5. Compile and load the programs to the devices

Step 6: Adding or Changing Icons

Picture of Adding or Changing Icons

I downloaded many images, including snow.gif (last snow in Tel-Aviv was in 1950). However, it is possible that there are conditions I do not know about. Since the API of Google Weather is not documented, I honestly don't know if there are more. If you come across a missing one, here are the steps required to add an additional icon (see also pictures for using the tools):
1. Get the missing icon from Google by following these steps (see picture too):
a. Open your browser and point it to Google service by typing in your browser
b. See missing icon should be listed there in the XML in an entry similar to this: <icon data="/ig/images/weather/foobar.gif"/> with icon name instead of foobar of course.
c. Download the image by typing the following in the browser:, right click on the image and save it to the folder with the images (microSD folder).
d. Launch the 4D systems tool called Graphics Composer, open the file goowea.gcs
e. Push the Add button below the list of image files and add your new icon file
f. Save the file using the save button
g. Write down where the new icon file was added (before what and after what other file)
h. Push the build button (looks like a chip with red legs)
i. Exit the tool
2. Connect the micro-SD reader to your PC and save the folder of microSD on it again
3. Modify the 4D display program to know about the new icon and place the name in exactly the same place of order as saved from step 1.g above. So if the new icon name is foobar.gif then edit the file WeatherScreen.4dg in the 4D directory (assuming foobar.gif is the name and placed between coudy.gif and haze.gif. Change the lines:
byte i_Cloudy  "cloudy.gif",0
byte i_Haze    "haze.gif",0
byte i_Cloudy  "cloudy.gif",0
byte i_FooBar "foobar.gif",0
byte i_Haze    "haze.gif",0
And the lines
word IconNames
        i_coRain, i_coSnow, i_coStorm, i_Cloudy, i_Haze, i_mCloudy, i_mSunny, …
word IconNames
        i_coRain, i_coSnow, i_coStorm, i_Cloudy, i_FooBar, i_Haze, i_mCloudy, i_mSunny, …
4. Send me the data, please


zmashiah (author)2012-02-11

After some period of time, I found few missing icons of weather and added those to the code. See the file

kashsya (author)2016-02-21

Hye zmashiah,

i'm doing a similar project with this now, but i'm use a mbed LPC1768 and want to display the result on TV-LCD

May I ask a question or your suggestions ?

Do you think this project also can support with mbed board, is it possible ?

Thank you

zmashiah (author)kashsya2016-02-24

Hi Kashsya,
I don't have first hand experience with mbed however if it has "network access" and more than 4K or RAM, it is possible.
Do note that Google stopped their weather service and I have another similar project using WeatherUnderground as the source for the weather data instead.

Rocky575 (author)2015-10-19

Hi there zmashiah!

First of all I want to say that it is a really great project!

I have a few questions.

I'm using Arduino Mega for this project+ Ethernet Shield how should I connect the the display (i'm using uLCD-32PT display as you suggested) to the arduino with the shield on? just to note the shield uses pins number 0-13 on the pwm side and 0-7 on the analog side. can I use Rx1 and Tx1 instead the pins you recommended? and should i change something in the code if I do so?

another question will I still be able to see the weather? since I can't really see if google still supports weather service.

Thanks alot!

zmashiah (author)Rocky5752015-10-19

Thank Rocky575,

Please note that Google end-of-life the weather web service. I have published another similar project that is based on Netduino Plus, with similar display as in here and it relies on Weather-Underground as weather data provider. The code there is easily ported to any of the newer Netduino members (C# coding is much simpler).

With respect to your question: You can modify the code to use different Serial port (UART), but as I am not familiar with shields you use, I can say if you can keep them stacked on the Mega with no collisions or not.

Dolphinone (author)2015-03-18

Is there a way to make this an updatable file? I need a file/s that not only can run Google maps but also a compass, weather display and temperature monitoring feature with display.

zmashiah (author)Dolphinone2015-04-02

Not sure what you mean updateable file. You can extend this as you like pretty easily. Having said that note that Google stopped supporting this weather service. I have another project on Instructables that uses Netduin+ to lookup weather data from WeatherUnderground. That one is pretty neat and work smoothly.

AndréC2 (author)2014-07-25

is it possible to make it work with wifi shields?

zmashiah (author)AndréC22014-07-25

Pretty confident you can. I don't have one and never tried it, but I would think that aside from setup() that needs to initialize the WiFi shield instead of the Ethernet all the rest would be the same.

AndréC2 (author)zmashiah2014-07-26

I'm going to buy a wifi shield and give it a try, if it work, I'll post it. Thanks!

zmashiah (author)AndréC22014-07-29

Just before you build this one, take a look at a different one I built that uses Netduino Plus and gets the data from Weather Underground. Much better if you ask me, and the latter is working in my living room for almost 3 years now

bbustin (author)2013-12-12

This is an extremely impressive project. Thanks for sharing it! The LCD display is so cool!

zmashiah (author)bbustin2013-12-13

Thanks you! After some time, I built a different one: that uses a Netduino but same video card and screen. Got several more improvements there over time too.

harishp (author)2012-08-01

Really great work thanks for instructions.

I'm also doing one application which may need to use some of your ideas. I'm not using any ethernet support in my application so i'll go with Arduino Uno and uVGA II.
In my application i've to write code for Arduino and connect to VGA monitor through uVGA.

The catch here is data which is going to display on monitor ll be data transfered by some other system to my main Arduino board (may be via wireless media) and one more thing is i need to produce output with resolution 1024*768 or higher...

Any one can help me out. Will the same setup support my requirements?????.


zmashiah (author)harishp2012-08-01

From what I know the uVGA does not have such high resolution.From their site you will see the supported resolutions:
Supports the following resolutions,
- 320 x 240 (QVGA)
- 640 x 480 (VGA)
- 800 x 480 (WVGA)
If the required resolution is a strong requirement, go for Rasbery PI (but it has HDMI connection not VGA).

harishp (author)zmashiah2012-08-02

Is any other vga controllers avilable with 1024*768 or higher resolution compatible to any other boards????

zmashiah (author)harishp2012-08-02

Not that I know of. Please remember you have ONLY 2KB of RAM on Arduino (unless you are using Arduino Mega). There is very little you can do with it for driving a detailed 1024x768 resolution screen.

Rasbery PI is a nice embedded board, cost in same range of Arduino and running Linux. I think it is the best choice if you need to drive hi-res screen.

harishp (author)zmashiah2012-08-02

Tanks for suggestions.

Can we interface other modules like zigbee, sensors etc?????

I'm checking, but i'm not getting any datasheet or full specifications.

last but not least, my application can run on any 16/32 bit controller. But getting output in monitor with high resolution is my first constraint.

zmashiah (author)harishp2012-08-02

Given Rasbery PI is Linus there will be support for Zigbee through open source libraries. I know there is at least one such library. You need to have UART support on the board to interface with these modules.

qlfecv (author)2012-07-17

Thanks for the great work.

I am using the LCD-43 and does not update the data on the screen.

I changed the rx and tx pins but still not working, any ideas?


zmashiah (author)qlfecv2012-07-17

Hi Jose,
Are you using GFX or SGC firmware of the display?
Please see the instruction on how to set it to GFX firmware.
Please see that the baud rate of the Arduino and that of the display are the same.

Do note, I made a new version of this with Netduino Plus, that takes data from Weather Underground service instead of Google. Now in my living room I am using the newer version of this with few more fixes I found along the way.

qlfecv (author)zmashiah2012-07-17

I'm use GFX firmware. I compile and upload WeatherScreeen.4dg file
I see the screen but no data. not update any data.

I am using Arduino ethernet board and do not know if it supports Netduino Plus.


zmashiah (author)qlfecv2012-07-18

Let's start with "debugging" the situation. First, modify the 4GL program so that it uses 9600 Baud Rate. You will see the line in setup() function that is commented out. So uncomment the line of 9600 and put comment to the current baud rate.

Download the new revision of the program after modifications above to the screen.

Next, from the 4D Workshop application, use "Tools | Terminal connect 9600" to connect to the Display from the PC.

Type the following (all characters, including the square brackets)
The outcome should be the display showing FooBar on the top of the screen for "Current Weather". If that happens, something is broken in the Arduino side.

If that does not happen, then something is broken in the serial communication of the display.

qlfecv (author)zmashiah2012-07-18

One question, what is the new version?


zmashiah (author)qlfecv2012-07-18

See here regarding the new version:

And did you do this terminal test?

qlfecv (author)zmashiah2012-07-18

I test it and work .

The problem is arduino, serial port software does not work. I changed pins (4,5) for (8,9) and does not work.

I use the library NewSoftSerial SoftwareSerial because I have not


qlfecv (author)qlfecv2012-07-18

Solved, I had to add:

pinMode(rx, INPUT);
pinMode(tx, OUTPUT);


zmashiah (author)qlfecv2012-07-18

Not sure why is that required, but happy it got resolved. Enjoy the weather :-)

qlfecv (author)zmashiah2012-07-18

I have another problem :(

In the screen no show sunny.gif icom, only show 'sunny.gif'.

I copied directory SD in SD card.


zmashiah (author)qlfecv2012-07-18

Does the SD contain the files "goowea.dat", "goowea.gc", "goowea.gci" and "goowea.gcs"?

Please try to format the SD (quick format is OK) and reload that content to it.
The .gif files are not really required on the SD as the 4D does not open any of them.

qlfecv (author)zmashiah2012-07-18

Where are the files?, In the zip file are not included.



zmashiah (author)qlfecv2012-07-18

In the file GW in here you will see the microSD directory with all files I mentioned above

qlfecv (author)zmashiah2012-07-19

I am using ver 3.0 the 4D firmware no version 0.95.

I'll try to use the version 0.95.


zmashiah (author)qlfecv2012-07-19

Ok keep me posted

qlfecv (author)zmashiah2012-07-19

working fine with v1.3 :)

Have you thought about modifying the code to work with Weather Underground?


zmashiah (author)qlfecv2012-07-19

Yes I did. Actually I built one similar unit that works with Weather Underground and published it's code in Instructables.
As the Arduino only has 2KB of RAM it is extremely challenging to do, so I moved to a different board called Netduino. It is similar to Arduino but being programmed with C# instead of C/C++. The exact board used is Netduino Plus that has Ethernet controller embedded on the board. See this:

Also note the 4D display program was modified too to include much more information I can grab from the Weather Underground service, like sunrise/sunset, moisture and barometric pressure for each day in the forecast.

zmashiah (author)qlfecv2012-07-18

OK, now that we know it is on the Arduino side, lets have the following:
What Arduino IDE version are you using? I built it with 0022 one and did not port it Arduino IDE 1.0 or 1.01

It is possible to switch between debug console and the display. In the file utilfuncs.h
change #define serialDisplay to be Serial and # define Console to be secondSerial

The the connection to the display will be digital pins 0 and 1.
On the Arduino side pin 0 is Rx, so connect it to Tx on the display
And Pin 1 on the Arduino side is Tx, connect it to Rx on the display.

zmashiah (author)qlfecv2012-07-18

One more thing:
Make sure that on the "Workshop" you set the programming to screen Flash and not to Screen Ram as in the picture below.

qlfecv (author)zmashiah2012-07-18

Yes, i programming to flash.


bobthebanana (author)2011-12-09

Thanks for the great idea! Although I don't have the ethernet pro or an ethernet shield, I made a version of this on my computer and set it up as a screen saver.

zmashiah (author)bobthebanana2011-12-11

Nice! It is definitely cold in Vancouver :-)
Funny thing is I built this because I saw a sample desktop (Vista / Win7) gadget that takes Google Weather and thought I should do it with Netduino/Arduino.

bartonkt (author)2011-11-28

Hello, I am trying to come up with a complete parts list based on the above. The two big questions I have are:

1. What do you mean by "Arduino I/O Headers socket" - this?

2. Do we also need to purchase 5x "Jumper Wires"? You don't mention how many pins they need to be, or if these are single pin??

This is the full parts list, with cost, I came up with:
3.2" LCD, $84.95,
VGA Adapter, $54.95,

Arduino Ethernet Pro, $54.95, FTDI Breakout board, $14.95, DHT 22 Temp & Humidity sensor, $9.94,
2 GB Micro SD, $6,
Push button, optional, $1.95, Power supply: Free, probably have one around the house
Ethernet cable: Free
2 x 10k ohm resistors: Free, or $0.25 each from Sparkfun
Jumper wires: ???
Arduino I/O Headers: $2.50, if I'm right above. 

Total Cost (without shipping charges): $175.25 or $145.25

zmashiah (author)bartonkt2011-11-28

Both VGA or LCD is shipped with male 0.1" headers that you need to connect to the Arduino board. The board itself, if you buy the Ethernet Pro comes with holes and no wires or headers. Total number of pins you need to connect is 5. You can choose to use wires to connect them or using jumper wires and socket. I chose to use male headers like this one: but it is really up to you.
The jumper wires in this case are female-female ones like this one:
ou will need 5 wires only and cost for a pack of 10 is $ 3,95.
Since I build a lot of stuff, I bought a stock of those in local shop for much cheaper. Try Fry's or something if you are on the west-coast.

Buying either the VGA or the LCD at at 4D systems can save you few dollars.

Ethernet Pro is a nice and compact, but if you want to save few dollars, you can buy an Arduino Uno and Ethernet Shield (Uno is ~ $23 and shield is ~ $ 15 in ebay). I did not test it with those shields, but assume it should work too. If you are not ready to do the adaption in case needed, go for the Ethernet Pro. One more comment on this, since you asked: If you go for the shield based approach, you will not need headers (those ship with female headers), but you will need a male-female jumper wire instead. 

FTDI is required (can be spared if you go for Uno+Shield) to program the units. Not required after assembly work done. That too is something I have at home...

DHT-22 is optional. But I noticed you did not include a small experimental or prototyping board to assemble it on together with the resistors and push button. You will need something like this or much simpler one you can buy at local shop that will be large enough to host multiple projects. It cost around $ 4 to have a large board that is about 10x the size required in this project (and you simply cut the size you want each time).

As for the SD, if you don't have a 1GB micro-SD somewhere from an old cell-phone or something, go for the 2GB. I think even a 1MB one would be enough, if there was such thing.

Yes, it is an expensive one, but the joy of doing it was worth every cent, penny or Shekel in my case :-).

Nick_de (author)2011-11-25

zmashiah (author)Nick_de2011-11-25

Hi Nick,
It might be possible to do this with "standard" LCD module. The code that I have here on the Arduino is basically scrapper of the XML data from the weather service (Google weather) and the entire graphics is handled by the display controller. I did not do much of graphics really (basic tiles with hand-made shading, text with variable font size and color, rectangle fills and bitmap display). All this graphical part is done in the 4GL code for the 4D systems VGA display adapter. I used it also on their LCD display (uLCD 32PT unit and it works).

The challenge will be with memory. The Arduino has enough of memory for code (about 24K used out of 32K it has) but the big shortage will be of RAM. The code already puts strings into program memory (using PROGMEM and PSTR). Not sure exactly how much memory really left, but can tell you that if you move some of the strings back to data the Arduino will reboot or behave very strangely, meaning data segment is really at the edge. Not a surprise, since overall it has only 2KB of RAM for data. Add to that the bitmaps are about 3K each, then loading those from SD to display will require working in small chunks, which is not fun. It might be more realistic to use the Mega flavor of Arduino that has 4KB of RAM for data for this type of application. The display controller has about 10KB for code and data, and I use about 5 or 6KB of it, again 3K for bitmap transfer from SD (it has its own micro SD socket), so not a big surprise. For the record, I tried this also with FEZ Panda-II (a Netduino flavor ARM board), their LCD module and Ethernet Shield. While I was able to complete the code in fraction of the time, the board was running out of memory irregularly, even before using NTP for time updates. I added aggressive garbage-collection calls but in vain. Once a day, out of nowhere the memory was eating up in one round of update from the Web service and the application will do the exception. That board has 62KB or RAM and the application code (it is C#) was weighting about 54K, so again on the edge of the resources, not exactly what you want to do with C#. I guess if I worked harder (not using XML library and stuff like that, but do it more specific as in the Arduino), it would fit, but then what is the point of using C#?

Nick_de (author)zmashiah2011-11-26

WOW, thanks a lot for the very detailed response! I always wanted to make a system to display when the next bus or tram is coming to my stop...
But to make a nice colourful & fancy display will take time and money so in the end I'm afraid I'll just use a simple text-only LCD display.
Again, nice work and thx for the reply!!

Nick_de (author)2011-11-25

Nice Ible!
Do you think also the LCDs present on this page would work?

Build_it_Bob (author)2011-11-24

Excellent work ! I will definately look more closely at this in the future...nice ...very nice!
Thanks for the ible!

Computothought (author)2011-11-18

Thanx for the url: I can add that to my page scraping project.

zmashiah (author)Computothought2011-11-19

Replace "yourcity" by the name of the city you live in.
So for me, living in Tel-Aviv the string looks like:

About This Instructable




Bio: An experienced manager in Hi-Tech that never gets bored with technology or life
More by zmashiah:Turning Stereo Amplifer On and Off automaticallyColorful Countdown Clock for tight timeline managementBluetooth mobile phone accessory for Missed calls and SMS
Add instructable to: