Real-Time Weather Dashboard

by littleBits July 14, 2014
6

Monitor current and forecasted weather data with littleBits and a little coding. These customizable and modular weather boxes display current temperature, the forecasted high and low temperatures for the day, and the forecasted conditions for the day (i.e. sunny, cloudy, precipitation).

Note: To complete this project, you will need to know how to work with APIs. The cloudBit’s API documentation can be found here. The Weather Underground's API documentation can be found here.

How they work:

We wrote a short program that gets information from Weather Underground and sends that data through the littleBits cloud to a cloudBit. Every 30 minutes the program asks Weather Underground for the current temperature and the forecasted high, low, and conditions for New York, NY. Then it converts this information into a voltage* which is sent to each cloudBit, adjusting the angle of the servos (the servos must be set to turn mode for this to work). We've posted the code for our program here.

*The program does not specify the volts, rather it sends a value from 0 to 100 which tells the cloudBit what percentage of the total power (5v) to output. 

Bits used: cloudBit™, servo, split, usb power, wire

Tags: Programming Wi-Fi Design Display & Decor Gadgets Fabrication

Videos and Recipes

Instructions

  1. 1

    Set up your cloudBits if you haven’t done so already. Instructions for setting up the cloudBit can be found here.

  2. 2

    Assemble the case: Add a little glue to the edges of each plate (A­1 through A­6) and press fit them together. You’ll want to use some masking tape or clamps to hold the plates together while the glue dries (see image 7). Be sure to wipe away any excess glue that squeezes out when you press the plates together.

  3. 3

    Glue on the wooden panels: Glue the wooden side panels onto the edges of the case and clamp until the glue dries (see image 8).

  4. 4

    Finish the wooden panels: If you would like to add a finish to your wooden panels, sand them once the glue has dried, then apply the finish. We sanded them first with 150 grit sandpaper, then 220 grit. After wiping off the dust, we applied Danish Oil according to the manufacturer’s instructions.

  5. 5

    Add graphics to the display panels: To get the white graphics painted on the black acrylic, we first etched the images onto the acrylic sheet using a laser cutter. Before we peeled the protective paper of the sheets, we gave the etched portions a couple of coats of white acrylic paint (image 9). Once the paint was dry, we peeled of the paper to reveal our graphics.

  6. 6

    Mount the servo: Mount the servo motor on acrylic plate C­3 using the two #4 machine screws (see image 10). Glue C­2 to the top of C­3 (see image 11). Glue the mounted servo to the back of C­1, the display panel (see image 12).

  7. 7

    Attach arrows: Using the xxx screw, attach the arrow to the servo. If you plug the servo into a power module, the servo will go to its 0% power position and hold there. Align the arrow to 0 degrees and tighten the screw (see image 13).

  8. 8

    Add faceplates to the case: Place some double sided tape or glue dots to the back of the acrylic plate (C­1) and the label plates (A­7). Press each into place on the case (see image 14)

  9. 9

    Add the circuit: Create the circuits shown in image 15 and add them to each case. We used the adhesive shoes to hold the circuits in place.

  10. 10

    Create your code: Write the program that will read the data from the Weather Underground API and pass that information on through the littleBits cloud to each of your cloudBits. You can check out our example on gitHub: (https://github.com/littlebits/project-cloud-weather-dashboard)

    *Note: You will need your own API key for Weather Underground. To get your cloudBit's access token and bit ID, look under the bit's settings in Cloud Control.

Bits used (15)

Collections

Add this collection to get these modules and more for a price savings

Other Materials Used (9)

  • 1/4" wood (we used cherry) 1
  • 1/8" black acrylic 1
  • 1/8" Masonite (aka hardboard) 1
  • 1/8" white acrylic 1
  • double sided tape 1
  • M2 x 8mm Machine screws 4
  • white acrylic paint 1
  • wood finish of your choice (we used Danish Oil) 1
  • wood glue 1

Tools (4)

  • Clamps
  • Laser Cutter
  • Sand Paper
  • Screwdriver

Other files

  • 6 Comments
  • rfgreer about 2 months ago

    Where is the code to work the servos??

    • david_littleBits about 2 months ago

      The code for the project is posted on gitHub (link in step 10). The same code that checks the Weather Underground API also sends the signal through the cloudBit to the servos.

  • vikingkarwur about 2 months ago

    Wow... Awesome project!

  • rfgreer about 2 months ago

    Thanks wednesdave.
    i see no code that will operate the servo !!
    have i over looked it ?

    • david_littleBits about 2 months ago

      The code for the servo is there, but it's easy to overlook (we will update the commenting in the code to make it easier to understand).

      The variable output_value is what gets sent through the cloudBit into the signal pin of the servo. A value of 0 sends nothing, a value of 20 sends 20% of the total voltage (5v), and so on up to 100%. The position of the servo is determined by the voltage coming in through the signal pin, so 20% of the total power will turn the servo 20% of its total arc (about 160 degrees).

  • clone-comander-green about 2 months ago

    It is very cool
    :-)¡

Must be logged in to comment. Sign in. Not a member? Join now