Difference between revisions of "Component: Temp / Humidity (DHT11) (Environmental)"
From Flowcode Help
Jump to navigationJump to searchLine 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 32: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 183: | Line 187: | ||
|- | |- | ||
| colspan="2" | The checksum value is used to ensure the data being received is correct. Yes = Only receive data if checksum is correct No = Ignore checksum | | colspan="2" | The checksum value is used to ensure the data being received is correct. Yes = Only receive data if checksum is correct No = Ignore checksum | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Advanced Settings | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 188: | Line 196: | ||
|- | |- | ||
| colspan="2" | On 8-bit PIC devices the timings can be a little tight as slower clock speeds and so we implement an adjustment factor to allow the sensor to function. Auto mode will attempt to automatically calculate a correct adjustment factor. Manual mode will allow you to set your own adjustment factor. | | colspan="2" | On 8-bit PIC devices the timings can be a little tight as slower clock speeds and so we implement an adjustment factor to allow the sensor to function. Auto mode will attempt to automatically calculate a correct adjustment factor. Manual mode will allow you to set your own adjustment factor. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 17:23, 9 November 2022
Author | Matrix TSL |
Version | 1.1 |
Category | Environmental |
Contents
Temp / Humidity (DHT11) component
The DHT11 temperature and humidity sensor is a popular sensor allowing the ambient temperature and relative humidity to be monitored digitally. Humidity Range = 20% - 90% +/- 5% Temperature Range = 0 - 50 Degrees C +/- 2 Degrees C
Component Pack
SENSORS
Detailed description
No detailed description exists yet for this component
Examples
Example Program showing how to sample the DHT11 sensor and show the temperature and humidity on an LCD.
DHT11 Example
Downloadable macro reference
![]() |
GetTempWhole |
Gets the whole number portion of the temperature returned by calling SampleSensor. If temperature is 15.8 degrees C then this function would return 15. | |
![]() |
Return |
![]() |
GetHumidityFloat |
Gets the humidity returned by calling SampleSensor as a floating point number. | |
![]() |
Return |
![]() |
GetTempString |
Gets the temperature returned by calling SampleSensor as a string. | |
![]() |
Return |
![]() |
GetHumidityString |
Gets the humidity returned by calling SampleSensor as a string. | |
![]() |
Return |
![]() |
GetHumidityWhole |
Gets the whole number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 15. | |
![]() |
Return |
![]() |
GetTempReal |
Gets the real number portion of the temperature returned by calling SampleSensor. If temperature is 15.8 degrees C then this function would return 8. | |
![]() |
Return |
![]() |
GetHumidityReal |
Gets the real number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 8. | |
![]() |
Return |
![]() |
SampleSensor |
Communicates with the DHT11 sensor and receives the temperature and humidity readings. Returns 0 for success, 1 for no communication detected and 2 for checksum error. | |
![]() |
Return |
![]() |
GetTempFloat |
Gets the temperature returned by calling SampleSensor as a floating point number. | |
![]() |
Return |