Things used in this project

Hardware components:
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
×1
Omron b3f 1000 image 75px
SparkFun Pushbutton switch 12mm
×1
10167 01
DHT22 Temperature Sensor
×1
Photon new
Particle Photon
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Hand tools and fabrication machines:
Lasercutter
Laser cutter (generic)

Schematics

schematic_PBlggV0OcD.png
Schematic pblggv0ocd

Code

code for taking temperature and humidityJava
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_DHT.h>



#define DHTPIN 4            // what pin we're connected to
#define DHTTYPE DHT22       // DHT 22 (AM2302)

DHT dht(DHTPIN, DHTTYPE);

double hum;                 // current hum
double temp;                // current temp

void setup() {
    Serial.begin(9600);
    pinMode(DHTPIN, INPUT);
    
    Particle.variable("hum", hum);
    Particle.variable("temp", temp);
}

void loop() {    
    double checkHum = dht.getHumidity();
    double checkTemp = dht.getTempFarenheit();
    
    if (checkHum > 0 && checkHum < 100)
        hum = checkHum;
        
    if (checkTemp > 32 && checkTemp < 100)
        temp = checkTemp;
    
    Serial.println("Temp: " + String(checkTemp));
    Serial.println("Hum: " + String(checkHum));
        
    delay(3000);
}

Credits

5d97702000a133eb076b6e19d7c0ca3f
Keane Thompson
-1 projects • 1 follower
Contact
Screen shot 2016 11 15 at 11 22 28 am 0dvpnpjvbp
Ethan Masunaga
-1 projects • 1 follower
Coder. Builder. Lover.
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