Skip to content

Commit 7a4f75d

Browse files
authored
Formatting and grammar improvements
1 parent 369886d commit 7a4f75d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

examples/DhtTemperatureAndHumiditySensor/DhtTemperatureAndHumiditySensor.ino

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* Version 1.1 - 2016-07-20: Converted to MySensors v2.0 and added various improvements - Torben Woltjen (mozzbozz)
2424
*
2525
* DESCRIPTION
26-
* This sketch provides an example how to implement a humidity/temperature
27-
* sensor using DHT11/DHT-22.
26+
* This sketch provides an example of how to implement a humidity/temperature
27+
* sensor using a DHT11/DHT-22.
2828
*
2929
* For more information, please visit:
3030
* http://www.mysensors.org/build/humidity
@@ -43,7 +43,7 @@
4343
#include <MySensors.h>
4444
#include <DHT.h>
4545

46-
// Set the pin you connected the DHT's data pin to
46+
// Set this to the pin you connected the DHT's data pin to
4747
#define DHT_DATA_PIN 2
4848

4949
// Set this offset if the sensor has a permanent small offset to the real temperatures
@@ -54,7 +54,7 @@
5454
static const uint64_t UPDATE_INTERVAL = 60000;
5555

5656
// Force sending an update of the temperature after n sensor reads, so a controller showing the
57-
// timestamp of the last update doesn't show something like 3 hours, in the unlikely case, that
57+
// timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
5858
// the value didn't change since;
5959
// i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
6060
static const uint8_t FORCE_UPDATE_N_READS = 10;
@@ -75,7 +75,7 @@ DHT dht;
7575

7676
void presentation()
7777
{
78-
// Send the Sketch Version Information to the Gateway
78+
// Send the sketch version information to the gateway
7979
sendSketchInfo("TemperatureAndHumidity", "1.1");
8080

8181
// Register all sensors to gw (they will be created as child devices)
@@ -86,13 +86,14 @@ void presentation()
8686
}
8787

8888

89-
void setup() {
89+
void setup()
90+
{
9091
dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
9192
if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
9293
Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
9394
}
9495
// Sleep for the time of the minimum sampling period to give the sensor time to power up
95-
// (otherwise, timeout erros might occure)
96+
// (otherwise, timeout errors might occure for the first reading)
9697
sleep(dht.getMinimumSamplingPeriod());
9798
}
9899

0 commit comments

Comments
 (0)