Weather Sensing Wardrobe

Made by Ranveer Katyal



To create a weather sensitive wardrobe that notifies the user of the outside temperature for them to dress appropriately in an ambient way. After performing an initial inquiry of the objects and lifestyle of a first year MBA student – I discovered that very often she forgot to check the weather outside while dressing up and ended up feeling too warm or too cold. In order to fix this problem in a most non-intrusive way I came up with the idea of the weather sensitive wardrobe.


To sense the weather outside and indicate it the user in a most non-intrusive way. Also, to provide the information with a sense of urgency of the weather is too extreme.


After conducting the interview, I started with understanding different sensors and components that can help me achieve the desired output.

The following components were used:

1. Particle Argon – Internet-connected microcontroller

2. TMP 36 Temperature sensor – to sense the temperature outside

3. Neo Pixel led – Emit different color lights to notify the user in a non-intrusive way

4. Piezo Buzzer: To emit sounds that will draw attention towards extreme weather

After discovering the components, I aim to achieve the following goals in step by step fashion:

1. Reading the temperature from the temperature sensor

2. Integrating Neo-pixel and emitting different colors based on the temperature reading:

  • Extreme Cold: Temperature less than -7 C. Color: Purple
  • Very Cold: Temperature between than -7 C and 5 C. Color: Blue
  • Cold: Temperature between than 5 C and 15 C. Color: Greenish - Blue
  • Pleasant: Temperature between than 15 C and 30 C. Color: Yellow
  • Warm: Temperature between than 30 C and 45 C. Color: Orange
  • Very hot: Temperature more than 45 C. Color: Red

3. Next, I added clothing suggestions based on the temperature that can be accessed on a mobile phone (in future) using an API.

  • Extreme Cold: Its crazy cold today! Try to cover up all exposed body parts!!
  • Very Cold: It's quite cold today! Consider layering up!!
  • Cold: It's somewhat cold. Probably you should get a sweater
  • Pleasant: It's a pleasant day. Have a good one!
  • Warm: It's a warm day today! Consider some light clothes!
  • Very hot: It's quite hot today! Be careful!!

4. After I achieved this - I realized that the temperature sensor was passing a lot of noise and the colors of the neo pixel were changing quite frequently. In order to fix that – I created an array to store the temperature values for the duration of 1 second and then averaged those values out to stabilize the output.

5. Next important step was to create a setup that would draw the attention of the user immediately to notify them of the extreme weather conditions. I achieved this by the following steps: In case of extreme weather conditions,

  • The led would pulsate that would draw attention
  • The Piezo buzzer would beep    


// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>

#define PIXEL_COUNT 1
#define PIXEL_PIN D7
#define PIXEL_TYPE WS2812B
Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int redValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int greenValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int blueValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255</td>
int buzzerPin = D5; // output pin for buzzer
int tempPin = A0;

int piezoPin = D2; // Setting up the piezo buzzer pin
int piezoPitch = 500;

double tempC;
String sugg;
void setup() {
    pinMode( tempPin , INPUT); // sets pin as input
    pinMode(piezoPin, OUTPUT);

  // Set up our NEOPIXEL RGB Pin pins for output

void loop() {
    double voltage;
    int readSum = 0;
    int read[10];
    int j;
    //taking a sample of temprature reading over a period of one second
    for(j=0; j<10;j++){
        read [j] = analogRead(tempPin);
        readSum = readSum + read[j];
    //average out the readings to reduce noise
    int reading = readSum/j;
    voltage = (reading * 3.3) / 4095.0;
    tempC = (voltage - 0.5) * 100;
    if (tempC<=-7){
        sugg = "Its crazy cold today! Try to cover up all exposed body parts!!";
        //pulsating purpule
        for (int i=0; i<5; i++){
                setRGBColor( 175,25,175); //set led to flash Purple
                setRGBColor( 0,0,0);
                tone(piezoPin, piezoPitch, 100); //warning sound for extreme weather
            delay(1000); //remove the flickering
    else if (tempC<=5 && tempC>-7){
        sugg = "Its quite cold today! Consider layering up!!";
        setRGBColor( 0,0,255); //Set the LED to flash Blue
        delay(1000); //remove the flickering
    else if(tempC>5 && tempC<=15 ){
        sugg = "Its somewhat cold. Probably you should get a sweater";
        setRGBColor( 0,255,153); //set led to flash green-blue
        delay(1000); //remove the flickering
    else if(tempC>15 && tempC<=30){
        sugg = "Its a pleasent day. Have a good one!";
            setRGBColor( 251,234,0); //set led to flash yellow
            delay(1000); //remove the flickering
    else if(tempC>30 && tempC<=45){
        sugg = "Its a warm day today! Consider some light clothes!";
        setRGBColor( 2243,73,8); //set led to flash orange
        delay(1000); //remove the flickering
        sugg = "Its quite hot today! Be careful!!";
        //pulsating red
            for (int i=0; i<5; i++){
                setRGBColor( 255,0,0); //set led to flash Purple
                setRGBColor( 0,0,0);
                tone(piezoPin, piezoPitch, 100);
            delay(1000); //remove the flickering
void setRGBColor( int r, int g, int b ){
  redValue = r;
  greenValue = g;
  blueValue = b;
  strip.setPixelColor(0, redValue, greenValue, blueValue);;
Click to Expand




TempratureSensing: Extreme cold
Ranveer Katyal -
TempratureSensing: Extreme Hot
Ranveer Katyal -

Reflection and Future Work:

It was a fun activity trying to create an ‘enchanted’ object out of a regular wardrobe. Its interesting that it would help the user in a non-intrusive fashion solving one of daily lifestyle problem.

1. Integration of a live weather API – It would provide a stable source of the weather inputs. Also, it would help capture other details such as rain and snow forecast.

2. Force sensors – It would help detect when the user is opening the doors of the wardrobe that would help activate the circuit.


Code snippets and Tutorials used

Share this Project




January 31st, 2019