Patrick Conway
Published © GPL3+

Humidor Monitor

This device can remotely monitor the temperature, humidity, and light level of a cigar humidor.

IntermediateShowcase (no instructions)6 hours365
Humidor Monitor

Things used in this project

Hardware components

Breadboard (generic)
Breadboard (generic)
×1
Photon
Particle Photon
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
Resistor 4.75k ohm
Resistor 4.75k ohm
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Photocell
×1

Hand tools and fabrication machines

wire cutters
22 Gauge wire
Drill

Story

Read more

Code

Project Code

C/C++
// This #include statement was automatically added by the Particle IDE.
#include "Adafruit_DHT/Adafruit_DHT.h"
// DHT parameters
#define DHTPIN 5
#define DHTTYPE DHT11
// Variables
int temperature;
int humidity;
int light;
// Pins
int light_sensor_pin = A0;
// DHT sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {

// Start DHT sensor
dht.begin();
}
void loop() {

// Humidity measurement
temperature = dht.getTempCelcius();

// Humidity measurement
humidity = dht.getHumidity();

// Light level measurement
float light_measurement = analogRead(light_sensor_pin);
light = (int)(light_measurement/4096*100);

// Publish data
Spark.publish("temperature", String(temperature) + " °C");
delay(2000);
Spark.publish("humidity", String(humidity) + "%");
delay(2000);
Spark.publish("light", String(light) + "%");
delay(2000);
No preview (download only).

Credits

Patrick Conway

Patrick Conway

2 projects • 0 followers

Comments