Thalia Kennedy
Published

Lane Tech HS - Temperature Notification

This project will notify you to open your rooms door or a window when the temperature/humidity in the room gets too high.

BeginnerFull instructions provided2 hours206
Lane Tech HS - Temperature Notification

Things used in this project

Hardware components

Argon
Particle Argon
×1
DHT11 Temperature & Humidity Sensor (3 pins)
DHT11 Temperature & Humidity Sensor (3 pins)
×1
Phone
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Resistor 220 ohm
Resistor 220 ohm
×1

Software apps and online services

IFTTT - Particle Service
Particle Build Web IDE
Particle Build Web IDE

Story

Read more

Schematics

Overhead View of Project

Fritzing Diagram

Updated just for you Mr. Law

Code

Temperature Project Code

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

#define DHTPIN D6     // what pin we're connected to

// Here we define the type of sensor used
#define DHTTYPE DHT11        // DHT 11 

DHT dht(DHTPIN, DHTTYPE);

void setup() {
    
 pinMode(D7, OUTPUT);
 Serial.begin(9600); 
 dht.begin();

}

void loop() {
    // Wait a few seconds between measurements.
    delay(10000);

    float f = dht.getTempFarenheit();

    // Check if any reads failed and exit early (to try again).
    if (isnan(f) || dht.getTempFarenheit() > 85.00) {
        Serial.println("Failed to read from DHT sensor!");
        return;
    }
    
    else if (dht.getTempFarenheit() > 74.00){
        Particle.publish("tooHot", "openDoor");
    }
  

  Serial.print(dht.getTempFarenheit());
  Serial.println(" degrees F");

}

Credits

Thalia Kennedy

Thalia Kennedy

3 projects • 2 followers

Comments

Add projectSign up / Login