Things used in this project

Hardware components:
09590 01
LED (generic)
or tri-led
×3
398 09
Adafruit RGB Backlight LCD - 16x2
doesn't have to be RGB
×1
Photon new
Particle Photon
×1
12002 04
Breadboard (generic)
×1
826 04
Male/Female Jumper Wires
×16
housing box
something big enough to house everything
×1
Software apps and online services:
Xidmhfnahh6gnduppwzf
Particle Pi
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service

Schematics

LCD Wiring
We used help from http://blog.jongallant.com/2015/10/particle-photon-lcd-setup/
Lcdsetup 0ao3w2lbv8
Piezo Wiring
We figured this one out on our own but the image belongs to http://diotlabs.daraghbyrne.me/6-controlling-outputs/piezo/
Piezo 1 yli7thtdio
Tri-LED Wiring
We also figured this out on our own but the image shows how to set it up. The image belongs to http://johnny-five.io/examples/led-rgb/
Led rgb qpfkvvfd6h

Code

What to Wear CodeJavaScript
Use in build.particle.io and http://blog.jongallant.com/2015/10/particle-photon-lcd-setup/ helped with the building blocks of the LCD code
#include "LiquidCrystal/LiquidCrystal.h"
LiquidCrystal lcd(D0, D1, D2, D3, D4, D5);
int ledHot = A0;
int ledCool = A1;
int ledCold = A2;
int sound = A5; 
int temp;

void setup() {

lcd.begin(16,2);
pinMode(sound, OUTPUT);
pinMode(ledHot,OUTPUT);
pinMode(ledCool, OUTPUT);
pinMode(ledCold, OUTPUT);
Particle.function("Clothing",clothingChoice);
digitalWrite(sound, LOW);
digitalWrite(ledCool, LOW);
digitalWrite(ledCold, LOW);
digitalWrite(ledHot, LOW);

}

void loop() {
   
}
int clothingChoice(String input){
    temp = atoi(input);
    if ((temp <= 80)&&(temp >= 61)){

        lcd.print("Cool wear Pants" );
        digitalWrite (ledCool, HIGH);
        digitalWrite (ledCold, LOW);
        digitalWrite (ledHot, LOW);
        digitalWrite(sound, HIGH);
        delay (2500);
        digitalWrite (ledCool, HIGH);
        digitalWrite (ledCold, LOW);
        digitalWrite (ledHot, LOW);
        digitalWrite(sound, HIGH);
        delay(2500);
        digitalWrite (ledCool, LOW);
        digitalWrite (ledCold, LOW);
        digitalWrite (ledHot, LOW);
        digitalWrite(sound, LOW);
        delay(10500);
        lcd.clear();
        return 1;
       
    }else if (temp <= 60){
    lcd.print ("Wear sweater cold");
    digitalWrite (ledCold, HIGH);
    digitalWrite (ledCool, LOW);
    digitalWrite (ledHot, LOW);
    digitalWrite(sound, HIGH);
    delay(2500);
    digitalWrite (sound, HIGH);
    digitalWrite (ledCold, HIGH);
    digitalWrite (ledCool, LOW);
    digitalWrite (ledHot, LOW);
    delay (2500);
     digitalWrite (sound, LOW);
    digitalWrite (ledCold, LOW);
    digitalWrite (ledCool, LOW);
    digitalWrite (ledHot, LOW);
    delay(10500);
    lcd.clear();
    return 2;
    
    }
else if (temp >= 81){
    lcd.print ("Wear shorts hot");
    digitalWrite (ledHot, HIGH);
    digitalWrite (ledCold, LOW);
    digitalWrite (ledCool, LOW);
    digitalWrite(sound, HIGH);
    delay (2500);
    digitalWrite (ledHot, HIGH);
    digitalWrite (ledCold, LOW);
    digitalWrite (ledCool, LOW);
    digitalWrite(sound, HIGH);
    delay (2500);
    digitalWrite (ledHot, LOW);
    digitalWrite (ledCold, LOW);
    digitalWrite (ledCool, LOW);
    digitalWrite(sound, LOW);
    delay(10500);
    lcd.clear();
    return 3;
    
} 
else {
    return -1;
}
}

Credits

Dcad7ff49f2c9498f2e3be841e6b300e
Eduardo Garcia
1 project • 0 followers
Contact
F8fe411344f2417c92ced595519dc9fd
Ray LIng
1 project • 0 followers
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login