short clean up for temperature sensor comments

This commit is contained in:
Max 2020-07-23 14:45:31 +02:00
parent 9ca90ccc46
commit 50f22fa759
2 changed files with 6 additions and 8 deletions

View File

@ -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;
// PWP des Bodens in Prozent: Standard ist Humus
// PWP of the Ground in Percentage: Standard is Humus
extern int permanentWiltingPoint;
// Boden vollständig gesättigt bei (Prozent): Standard ist Humus
// Ground completely saturated by (Percentage): Standard is Humus
extern int soilSaturation;
// Helligkeitswert der mindestens vorhanden sein muss
// Minimum light value before light turns on
extern int minimumLightValueLX;
// switches for automatic light and irrigation control
extern bool automaticLight;

View File

@ -6,21 +6,19 @@
#define DHTPIN PIN_DHT11
#define DHTTYPE DHT11
// specify pin and type
DHT_Unified dht(DHTPIN, DHTTYPE);
// initialize temperature sensor
void setupTemperatureSensor() {
// Serial.begin(9600);
dht.begin();
Serial.println(F("DHT11 Unified Sensor Ready"));
sensor_t sensor;
dht.temperature().getSensor(&sensor);
}
// Get humidity event and its value.
float readHumidity(){
sensors_event_t event;
dht.humidity().getEvent(&event);
return event.relative_humidity;