Weather Clothes Recommender - Dress Appropriately

124

2

Posted

Introduction: Weather Clothes Recommender - Dress Appropriately

This is a mini local weather station that can be setup either on your backyard or even on your bedside window. It uses information gathered about the weather using sensors and an Arduino to make an appropriate recommendation given the weather outside.

Step 1: BoM

  • Arduino
  • LCD Display
  • Temperature sensor - TMP36
  • Breadboard
  • Jumper cables
  • Breadboard cables

Step 2: Wiring

Follow the table below for a concise guide for wiring the peripherals with the Arduino Board.

I/OI/O Pin# Arduino Pin#
Temperature Sensor 1GND
2A0
33.3V
LCD Pin#Potentiometer Pin#Arduino Pin#
1, 5, and 161GND
2 and 1533.3V
32
412
611
115
124
133
142

Step 3: Code

// built in arduino library
#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);
int tempVal;  //raw reading variable
float volts;
float tempC;
float tempF;
void setup()
{
  lcd.begin(16, 2);
  // clear old screen data
  lcd.clear();
  // text to be dispalyed on the screen
  Serial.begin (9600);
}
void loop()
{
 //read the temp sensor and store it in tempVal
 tempVal = analogRead(A0);
 
 //converting that reading to voltage by multiplying the reading by 3.3V 
 volts = tempVal * 3.3;
 volts /= 1023.0;
 //calculate temperature celsius from voltage
 tempC = (volts - 0.5) * 100 ;
  // Convert from celcius to fahrenheit
 tempF = (tempC * 9.0 / 5.0) + 32.0;
 Serial.println(tempC);
 
 // (column 0) of the second line (line 1):
 lcd.setCursor(0,0);
 lcd.write ("Temp: ");
 lcd.setCursor (7, 0);
 lcd.print (tempC, 2);
 lcd.setCursor (13, 0);
 lcd.write ("C");
 if (tempC <0){
 lcd.setCursor (0, 1);
 lcd.write ("wear winter coat")
 }else if (temp <20){
  lcd.write ("wear light coat");} else if (tempC<25){
    lcd.write ("windbreaker");} else if (tempC>30){
      lcd.write ("beach weather!!!")}
 // for farenheit temperatures
 /*
 lcd.setCursor(0,1);
 lcd.write ("Temp: ");
 lcd.write (tempF);
 lcd.setCursor (10, 1)
 lcd.write ("F");
 */
 
  delay(1000);
}

Step 4: Mount

Snake the wires through to the outside of your window under the screen. It's easiest to remove the screen, mount the temperature sensor and then replace the screen.

Step 5: Enjoy!

Enjoy your build!

And wear weather appropriate clothing, stay warm, stay cool (depending on your hemisphere)!!!

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Gluten Free Challenge

    Gluten Free Challenge
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

Comments