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) {
|
||||
timestamp = millis();
|
||||
|
||||
// Read brightness
|
||||
lux = lightMeter.readLightLevel();
|
||||
|
||||
sensors_event_t event;
|
||||
|
||||
// Read temperature
|
||||
dht.temperature().getEvent(&event);
|
||||
temperature = event.temperature;
|
||||
// Read temperature as Fahrenheit (isFahrenheit = true)
|
||||
|
||||
// Read humidity
|
||||
dht.humidity().getEvent(&event);
|
||||
humidity = event.relative_humidity;
|
||||
|
||||
// Read soil
|
||||
soil = readSoil();
|
||||
|
||||
// Read salt
|
||||
salt = readSalt();
|
||||
|
||||
// Read battery
|
||||
bat = readBattery();
|
||||
|
||||
Serial.printf("DHTT:%.2f H:%.2f Lux:%.2f Soil:%u Salt:%u Bat:%.2f\n",
|
||||
|
Loading…
Reference in New Issue
Block a user