Component: Temp / Humidity (DHT11) (Environmental): Difference between revisions
Appearance
No edit summary |
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
||
| Line 88: | Line 88: | ||
===GetHumidityFloat=== | ===GetHumidityFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 102: | Line 102: | ||
===GetHumidityReal=== | ===GetHumidityReal=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 116: | Line 116: | ||
===GetHumidityString=== | ===GetHumidityString=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 130: | Line 130: | ||
===GetHumidityWhole=== | ===GetHumidityWhole=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 144: | Line 144: | ||
===GetTempFloat=== | ===GetTempFloat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 158: | Line 158: | ||
===GetTempReal=== | ===GetTempReal=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 172: | Line 172: | ||
===GetTempString=== | ===GetTempString=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 186: | Line 186: | ||
===GetTempWhole=== | ===GetTempWhole=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 200: | Line 200: | ||
===SampleSensor=== | ===SampleSensor=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 215: | Line 215: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
Revision as of 14:15, 13 July 2026
| Author | Matrix TSL |
| Version | 1.1 |
| Category | Environmental |
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 Source Code
Please click here to download the component source project: FC_Comp_Source_DHT11.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_DHT11.fcfx
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
Macro reference
GetHumidityFloat
| GetHumidityFloat | |
| Gets the humidity returned by calling SampleSensor as a floating point number. | |
| Return | |
GetHumidityReal
| 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 | |
GetHumidityString
| GetHumidityString | |
| Gets the humidity returned by calling SampleSensor as a string. | |
| Return | |
GetHumidityWhole
| 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 | |
GetTempFloat
| GetTempFloat | |
| Gets the temperature returned by calling SampleSensor as a floating point number. | |
| Return | |
GetTempReal
| 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 | |
GetTempString
| GetTempString | |
| Gets the temperature returned by calling SampleSensor as a string. | |
| Return | |
GetTempWhole
| 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 | |
SampleSensor
| 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 | |