Looking for the original video?

When you check the weather in the morning, what are you really trying to figure out? What to wear! Deciding what to wear is tough -- no one should have to think that much in the morning. Use Wearcast!

Both members of our group are from places that rarely drop below 60°F (South Carolina and Florida), so we have trouble figuring out what's "sweater weather" vs. "jacket weather." Wearcast takes the guesswork out of the equation by analyzing current weather conditions and comparing them to what's in your closet. It then shows a visual representation of what to wear in a modern, sophisticated display.

Technical Details

Wearcast uses two Arduino microcontrollers. One is an alarm clock/server that can pull weather data from the Weather Underground (wunderground.com) via an Ethernet connection. It communicates with a wall-mounted display panel that receives data about which clothes the user should wear via bluetooth, then updates the display panel accordingly.

The display panel is a back-lit piece of laser-cut MDF with icons that light up to display information. This information includes the temperature, what clothes the user should wear, and how many of each article of clothing they have available. Buttons on the display panel can be used to increment or decrement the number of clothing articles available, or reset the total count when the user has washed all of their clothes. This information is stored on the panel's microcontroller.

Our Design

The clock and panel components of Wearcast

The clock is a box with a digital display, switches, and push buttons that can be used to set the time or alarm. It was designed in Solidworks and fabricated with the laser cutters in Penn's Rapid Prototyping Lab.

The display panel is wall-mountable and features icons back-lit with Adafruit Neopixel LED strips, as well as an LCD screen. Paramaters like the amount of clothes in the user's wardrobe and how many of those are clean can be viewed and adjusted with the LCD screen and buttons on the panel. The icons the panel were designed in Auto-CAD and fabricated with the laser cutters.

Our Code

When the alarm goes off in the morning, or at the top of every hour, the clock gets weather data from Weather Underground. That data is processed through a series of if-statements and switch-cases to determine which weather condition and clothes icons should be illuminated. Because there are 26 icons on the display panel, each icon is assigned to a letter of the alphabet (a - z). The weather processing and clothes-selecting algorithms in the clock code output a single String of characters (and integers to represent the temperature), which is sent via bluetooth to the panel. This graphic shows how Wearcast might write a String to represent a 28°F, snowy day:

The String writing process visualized

The panel receives the instruction from the clock and illuminates the appropriate icons. If the instruction was sent as part of the alarm (meaning the user has woken up for the morning), the panel will automatically update the quantity of each article of clothing to reflect their being worn. If the user wants to adjust the quantity of each article that they own, they can do so in "Programming Mode" with the buttons on the panel face. When the user has washed their clothes, pressing the "Wash" button will reset their wardrobe to its full capacity.

The code for the entire project was developed with the Arduino IDE, and utilized Weather Underground's JSON API. The code can be viewed on github here.

Challenges We Faced

One of our biggest sources of frustration was the Adafruit Neopixels used in the display panel. They worked great as long strips, but when we began to cut them up into columns for our project, we realized that soldering the connections between them was extremely difficult because of their fragility. It took trial and error, but eventually we figured out a method for soldering them quickly so the copper pads would not overheat and fall off.

While prototyping the button interfaces for both the clock and the panel, we used the small push-buttons from our ESE 111 boxes, and we planned to switch to nicer panel-mount buttons for the final product. As soon as we switched over to the panel-mount buttons, all of our systems immediately went haywire, flashing all kinds of displays and lights. We discovered after much confusion that the panel-mount buttons were inverted - they read as "HIGH" until they were pressed. As soon as we inverted the all the "HIGH"s in our code, the buttons worked like a charm.

We also experienced hardware issues with the Bluetooth module used in the display. The day before presenting, we discovered that it would not power on, and we believe it had been fried by the 5 volts coming from the Arduino. By studying some online tutorials, we were able to reprogram two master bluetooth modules into a master-slave pair running at 3.3 volts, and Wearcast was back up and running.

What We Learned

Sid told us at the beginning of the project that the most important thing was to break down the project into smaller sub-systems before trying to integrate them. We took that advice to heart, and the project went so much better than it could have because of it. By testing and perfecting the most difficult systems first (the Neopixels, the 7-segment LED's, the Ethernet), we were able to avoid the headache of trying to debug several complicated systems at one time.

Antonio testing the Neopixels.

On a technical level, we both learned how to use complicated components, libraries, and systems that we had no prior knowledge of, and we gained the experience of combining those elements into the largest hardware project either of us had ever worked on. Knowledge of sending and receiving information over the Internet using an unfamiliar API and then converting that information into usable instructions is such a huge part of computing and hacking, and we both got plenty of experience with it during this project. We also familiarized ourselves with how to debug (and completely reconfigure) Bluetooth communication between the two micro-controllers. We also learned how to configure Solidworks and AutoCAD files so that they can easily be fabricated with the laser cutter.

What's Next?

After all the stress and fun of this project, we both looked back to think about what we would change if we could do it all again. We both agreed that after the bad luck the class had with Detkin's Ethernet that the clock would be more reliable and easier to use if it used a WiFi connection rather than Ethernet. Wearcast also could have had some kind of smartphone integration, perhaps a way to adjust your wardrobe or alarm on the phone. We also would have liked to integrate some kind of real-time clock chip into the clock, so that the time would not reset when the clock loses power.

Built With

Share this project: