Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Fixed small spelling mistakes. #49

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DHTesp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void DHTesp::readSensor()
error = ERROR_NONE;
}

//boolean isFahrenheit: True == Fahrenheit; False == Celcius
//boolean isFahrenheit: True == Fahrenheit; False == Celsius
float DHTesp::computeHeatIndex(float temperature, float percentHumidity, bool isFahrenheit)
{
// Using both Rothfusz and Steadman's equations
Expand Down Expand Up @@ -328,7 +328,7 @@ float DHTesp::computeHeatIndex(float temperature, float percentHumidity, bool is
return isFahrenheit ? hi : toCelsius(hi);
}

//boolean isFahrenheit: True == Fahrenheit; False == Celcius
//boolean isFahrenheit: True == Fahrenheit; False == Celsius
float DHTesp::computeDewPoint(float temperature, float percentHumidity, bool isFahrenheit)
{
// reference: http://wahiduddin.net/calc/density_algorithms.htm
Expand All @@ -348,7 +348,7 @@ float DHTesp::computeDewPoint(float temperature, float percentHumidity, bool isF
return isFahrenheit ? toFahrenheit(Td) : Td;
}

//boolean isFahrenheit: True == Fahrenheit; False == Celcius
//boolean isFahrenheit: True == Fahrenheit; False == Celsius
byte DHTesp::computePerception(float temperature, float percentHumidity, bool isFahrenheit)
{
// Computing human perception from dew point
Expand Down Expand Up @@ -403,7 +403,7 @@ byte DHTesp::computePerception(float temperature, float percentHumidity, bool is
return Perception_SevereUncomfy;
}

//boolean isFahrenheit: True == Fahrenheit; False == Celcius
//boolean isFahrenheit: True == Fahrenheit; False == Celsius
float DHTesp::getComfortRatio(ComfortState &destComfortStatus, float temperature, float percentHumidity, bool isFahrenheit)
{
float ratio = 100; //100%
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DHTesp [![Build Status](https://github.com/beegee-tokyo/DHTesp/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/beegee-tokyo/DHTesp/actions)
===
<!-- [![Build Status](https://travis-ci.com/beegee-tokyo/DHTesp.svg?branch=master)](https://travis-ci.com/beegee-tokyo/DHTesp) -->
DHT ESP Temperature/Humidity Sensors
====================================

_**This library is no longer maintained**_

Expand All @@ -13,7 +12,7 @@ When I searched through Github for DHT libraries, I found a lot of them, some of
Another problem I found is that many of the available libraries use the same naming (dht.h, dht.cpp), which easily leads to conflicts if different libraries are used for different platforms.

_**According to users, the library works as well with DHT33 and DHT44 sensors. But as I do not own these sensors, I cannot test and confirm it. However, if you want to use this sensors, you can do so by using `setup(pin, DHTesp::DHT22)` and it should work.
Please give me feedback in the issues if you successfull use these sensors.
Please give me feedback in the issues if you successful use these sensors.
Thank you**_

The library is tested as well on ESP8266 and should work on AVR boards as well.
Expand Down Expand Up @@ -85,7 +84,7 @@ See example _`DHT_Multi.ino`_

_**`DHT_ERROR_t getStatus();`**_
- Get last error if reading from the sensor failed. Possible values are:
- ERROR_NONE no error occured
- ERROR_NONE no error occurred
- ERROR_TIMEOUT timeout reading from the sensor
- ERROR_CHECKSUM checksum of received values doesn't match

Expand All @@ -102,10 +101,10 @@ _**`int8_t getNumberOfDecimalsTemperature();`**_
- Get number of decimals in the temperature value. For DHT11 this is 0, for other sensors it is 1

_**`int8_t getLowerBoundTemperature();`**_
- Get lower temperature range of the sensor. For DHT11 this is 0 degree Centigrade, for other sensors this is -40 degree Centrigrade
- Get lower temperature range of the sensor. For DHT11 this is 0 degree Centigrade, for other sensors this is -40 degree Centigrade

_**`int8_t getUpperBoundTemperature();`**_
- Get upper temperature range of the sensor. For DHT11 this is 50 degree Centigrade, for other sensors this is 125 degree Centrigrade
- Get upper temperature range of the sensor. For DHT11 this is 50 degree Centigrade, for other sensors this is 125 degree Centigrade

_**`int8_t getNumberOfDecimalsHumidity();`**_
- Get number of decimals in the humidity value. This is always 0.
Expand All @@ -117,22 +116,22 @@ _**`int8_t getUpperBoundHumidity();`**_
- Get upper temperature range of the sensor. For DHT11 this is 90 percent, for other sensors this is 100 percent

_**`static float toFahrenheit(float fromCelcius);`**_
- Convert Centrigrade value to Fahrenheit value
- Convert Centigrade value to Fahrenheit value

_**`static float toCelsius(float fromFahrenheit) { return (fromFahrenheit - 32.0) / 1.8; };`**_
- Convert Fahrenheit value to Centigrade value

_**`float computeHeatIndex(float temperature, float percentHumidity, bool isFahrenheit=false);`**_
- Compute the heat index. Default temperature is in Centrigrade.
- Compute the heat index. Default temperature is in Centigrade.

_**`float computeDewPoint(float temperature, float percentHumidity, bool isFahrenheit=false);`**_
- Compute the dew point. Default temperature is in Centrigrade.
- Compute the dew point. Default temperature is in Centigrade.

_**`float computeAbsoluteHumidity(float temperature, float percentHumidity, bool isFahrenheit=false);`**_
- Compute the absolute humidity in g/m³. Default temperature is in Centrigrade.
- Compute the absolute humidity in g/m³. Default temperature is in Centigrade.

_**`float getComfortRatio(ComfortState& destComfStatus, float temperature, float percentHumidity, bool isFahrenheit=false);`**_
- Compute the comfort ratio. Default temperature is in Centrigrade. Return values:
- Compute the comfort ratio. Default temperature is in Centigrade. Return values:
0 -> OK
1 -> Too Hot
2 -> Too cold
Expand All @@ -144,7 +143,7 @@ _**`float getComfortRatio(ComfortState& destComfStatus, float temperature, float
6 -> Cold and dry

_**`byte computePerception(float temperature, float percentHumidity, bool isFahrenheit=false);`**_
- Compute the human perception. Default temperature is in Centrigrade. Return values:
- Compute the human perception. Default temperature is in Centigrade. Return values:
0 -> Dry
1 -> Very comfortable
2 -> Comfortable
Expand All @@ -155,7 +154,7 @@ _**`byte computePerception(float temperature, float percentHumidity, bool isFahr
7 -> Severe uncomfortable

_**`uint8_t getPin(void);`**_
- Returns the assigned GPIO for this instance. Usefull when connecting multiple sensors
- Returns the assigned GPIO for this instance. Useful when connecting multiple sensors

Usage
-----
Expand Down
4 changes: 2 additions & 2 deletions examples/DHT_ESP32/DHT_ESP32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ void tempTask(void *pvParameters) {
* getTemperature
* Reads temperature from DHT11 sensor
* @return bool
* true if temperature could be aquired
* false if aquisition failed
* true if temperature could be acquired
* false if acquisition failed
*/
bool getTemperature() {
// Reading temperature for humidity takes about 250 milliseconds!
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version=1.18
author=beegee_tokyo
maintainer=beegee_tokyo <[email protected]>
sentence=Arduino ESP library for DHT11, DHT22, etc Temp & Humidity Sensors
paragraph=Optimized libray to match ESP32 requirements. Last changes: Fix negative temperature problem (credits @helijunky)
paragraph=Optimized library to match ESP32 requirements. Last changes: Fix negative temperature problem (credits @helijunky)
category=Sensors
url=http://desire.giesecke.tk/index.php/2018/01/30/esp32-dht11/
architectures=esp8266,esp32,samd,avr
Expand Down