changed temperature comments, cleaned up
This commit is contained in:
parent
960699fbc8
commit
f6b2fc75dd
@ -1,10 +1,10 @@
|
|||||||
// Feldkapazität des Bodens in Prozent: Standard ist Humus
|
// Fieldcapacity of the Ground in Percentage: Standard is Humus
|
||||||
extern int fieldCapacity;
|
extern int fieldCapacity;
|
||||||
// PWP des Bodens in Prozent: Standard ist Humus
|
// PWP of the Ground in Percentage: Standard is Humus
|
||||||
extern int permanentWiltingPoint;
|
extern int permanentWiltingPoint;
|
||||||
// Boden vollständig gesättigt bei (Prozent): Standard ist Humus
|
// Ground completely saturated by (Percentage): Standard is Humus
|
||||||
extern int soilSaturation;
|
extern int soilSaturation;
|
||||||
// Helligkeitswert der mindestens vorhanden sein muss
|
// Minimum light value before light turns on
|
||||||
extern int minimumLightValueLX;
|
extern int minimumLightValueLX;
|
||||||
// switches for automatic light and irrigation control
|
// switches for automatic light and irrigation control
|
||||||
extern bool automaticLight;
|
extern bool automaticLight;
|
||||||
|
|||||||
@ -2,25 +2,23 @@
|
|||||||
#include <DHT_U.h>
|
#include <DHT_U.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
|
|
||||||
#define DHTPIN PIN_DHT11
|
#define DHTPIN PIN_DHT11
|
||||||
#define DHTTYPE DHT11
|
#define DHTTYPE DHT11
|
||||||
|
|
||||||
|
// set pin and type
|
||||||
DHT_Unified dht(DHTPIN, DHTTYPE);
|
DHT_Unified dht(DHTPIN, DHTTYPE);
|
||||||
|
|
||||||
|
// initialize temperature sensor
|
||||||
void setupTemperatureSensor() {
|
void setupTemperatureSensor() {
|
||||||
// Serial.begin(9600);
|
// Serial.begin(9600);
|
||||||
dht.begin();
|
dht.begin();
|
||||||
Serial.println(F("DHT11 Unified Sensor Ready"));
|
Serial.println(F("DHT11 Unified Sensor Ready"));
|
||||||
sensor_t sensor;
|
sensor_t sensor;
|
||||||
dht.temperature().getSensor(&sensor);
|
dht.temperature().getSensor(&sensor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get humidity event and its value.
|
// Get humidity event and its value.
|
||||||
float readHumidity(){
|
float readHumidity(){
|
||||||
|
|
||||||
sensors_event_t event;
|
sensors_event_t event;
|
||||||
dht.humidity().getEvent(&event);
|
dht.humidity().getEvent(&event);
|
||||||
return event.relative_humidity;
|
return event.relative_humidity;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user