Added some comments
This commit is contained in:
parent
6050fb6956
commit
1d4e24fa0e
11
src/main.cpp
11
src/main.cpp
@ -153,17 +153,26 @@ void loop()
|
|||||||
if (millis() - timestamp > 1000) {
|
if (millis() - timestamp > 1000) {
|
||||||
timestamp = millis();
|
timestamp = millis();
|
||||||
|
|
||||||
|
// Read brightness
|
||||||
lux = lightMeter.readLightLevel();
|
lux = lightMeter.readLightLevel();
|
||||||
|
|
||||||
sensors_event_t event;
|
sensors_event_t event;
|
||||||
|
|
||||||
|
// Read temperature
|
||||||
dht.temperature().getEvent(&event);
|
dht.temperature().getEvent(&event);
|
||||||
temperature = event.temperature;
|
temperature = event.temperature;
|
||||||
// Read temperature as Fahrenheit (isFahrenheit = true)
|
|
||||||
|
// Read humidity
|
||||||
dht.humidity().getEvent(&event);
|
dht.humidity().getEvent(&event);
|
||||||
humidity = event.relative_humidity;
|
humidity = event.relative_humidity;
|
||||||
|
|
||||||
|
// Read soil
|
||||||
soil = readSoil();
|
soil = readSoil();
|
||||||
|
|
||||||
|
// Read salt
|
||||||
salt = readSalt();
|
salt = readSalt();
|
||||||
|
|
||||||
|
// Read battery
|
||||||
bat = readBattery();
|
bat = readBattery();
|
||||||
|
|
||||||
Serial.printf("DHTT:%.2f H:%.2f Lux:%.2f Soil:%u Salt:%u Bat:%.2f\n",
|
Serial.printf("DHTT:%.2f H:%.2f Lux:%.2f Soil:%u Salt:%u Bat:%.2f\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user