Arduino for Beginners: API's and Checking Local Weather Via WIFI




Introduction: Arduino for Beginners: API's and Checking Local Weather Via WIFI

About: My name is Matthew and I attend the University of Pittsburgh. Currently I am a senior, going for a bachelors in Information Science with a minor in CS. Current interests include augmented reality, virtual re...

In this video we will use an Arduino Yun (or leonardo with a wifi shield) to connect with the Yahoo Weather API and return the value of the local temperature (whatever location you want!) as an integer to be used in whatever project you can dream up. We will go through a service called Temboo that makes communicating with many API's very easy.

You will need:

- Arduino Yun or an Arduino Leonardo and a WIFI Shield (BOTH will be considered a "YUN" board in the Arduino IDE).

- A USB cable.

- A 9V Battery

-and a 9V battery pack with barrel plug to power the Arduino Board and an on/off switch.

Links to all parts can be found here:

Parts and Code

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Get Connected to Your Network.

For the Arduino Yun board follow this link to get connected to your network:

How to: YUN Board

For the Leonardo and a wifi shield follow these instructions:

How To: Leonardo and WIFI Shield

Step 2: Sign Up for a Temboo Account and Get Your Credentials.

Sign up for a Temboo Account and navigate to the "APPLICATIONS" section to get your

- Temboo account name

-App key name

-and App key

Step 3: Create a New Sketch and Upload Some Code:

Create a new sketch, copy the main code and paste it into the IDE

(I will also upload the whole thing as a .zip file here).


Click the down arrow underneath the magnifying glass icon, and hit new tab.

Call the new tab "TembooAccount.h" (without the quotes)

Copy and paste in the smaller code snippet (that was below the larger one) and save it.

Step 4: Upload the Code and See the Local Weather!

-Click the TembooAccount.h file and enter in all your Temboo credientials from the "applications" section of your account.

-Go to the main program and find this line:

String ADDRESS_FOR_FORECAST = "*****"; //Enter zipcode for where you want to check the weather.....

-Inside the quotes enter your desired "zipcode" or "city, state"

-Plug in your board via USB and power it with the 9V battery pack.

-Hit tools, board, and choose Arduino YUN board. Hit port, and select the USB port that your board is on.

-Upload the code and open the serial monitor. You should now be displaying the local temperature for your desired location as an integer.

-Towards the bottom of the main program you can see that this integer gets stored in a variable called "temp"

I left some space there below it so you can incorporate this into your next project and have it perform actions based on the value of the temperature being returned.

Have Fun!

Raspberry Pi Contest 2016

Participated in the
Raspberry Pi Contest 2016

Digital Life 101 Challenge

Participated in the
Digital Life 101 Challenge

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020



    Question 1 year ago on Step 4

    Hi! I want to modify your program to get 3 bits of information: The high temperature forecast for today, the high temperature forecast for tomorrow, and the chance of precipitation tomorrow. How do I parse out those specific bits?