5cameron5Borna Vujicic
Published © GPL3+

The Machine That Lets You Know When Your Dog Is Hot

This device measures the temperature of the room. When it is above a specified temperature a LED will be activated to let you know.

BeginnerWork in progress12 hours40
The Machine That Lets You Know When Your Dog Is Hot

Things used in this project

Hardware components

Argon
Particle Argon
×2
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×2
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
LED (generic)
LED (generic)
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE

Story

Read more

Schematics

Temperature graph

Resistance Graph

temperature_schematic_Ii73IgOuVA.pdf

led_schematic_bb8uaDYYV9.pdf

Code

Temp sensor code

C/C++
#include <dht_nonblocking.h>

#include "spark-dallas-temperature.h"

#include <OneWire.h>

#define ONE_WIRE_BUS 7

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

#define DHT_SENSOR_TYPE DHT_TYPE_11

static const int DHT_SENSOR_PIN = 2;

DHT_nonblocking dht_sensor(DHT_SENSOR_PIN, DHT_SENSOR_TYPE );

int TempSensor = D4;
    
void setup() {
    pinMode(TempSensor, INPUT);
    Serial.begin(9600);
    sensors.begin();

}

void loop() {
    Temp = digitalRead(TempSensor);
    if (Temp >= 30) {
        Particle.publish("toggle-led","Its HOT!", PRIVATE);
    }

LED code

C/C++
void setup() {
pinMode(D6,OUTPUT);
Particle.subscribe("toggle-led",toggleLed,MY_DEVICES);
}

void loop() {
    
Particle.subscribe("toggle-led")
  Temp =  Particle.subscribe("toggle-led")
    if Temp >= 30 {
        digitalWrite(D6, HIGH);
    }
    else {
        digitalWrite(led1, LOW);
    }
}

Credits

5cameron5

5cameron5

1 project • 1 follower
Borna Vujicic

Borna Vujicic

0 projects • 1 follower

Comments

Add projectSign up / Login