Component: Temp / Humidity (DHT11) (Environmental): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 90: | Line 90: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityFloat''' | ||
|- | |- | ||
| Line 104: | Line 104: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityReal''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityReal''' | ||
|- | |- | ||
| Line 118: | Line 118: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityString''' | ||
|- | |- | ||
| Line 132: | Line 132: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityWhole''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityWhole''' | ||
|- | |- | ||
| Line 146: | Line 146: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloat''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloat''' | ||
|- | |- | ||
| Line 160: | Line 160: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempReal''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempReal''' | ||
|- | |- | ||
| Line 174: | Line 174: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempString''' | ||
|- | |- | ||
| Line 188: | Line 188: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempWhole''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempWhole''' | ||
|- | |- | ||
| Line 202: | Line 202: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleSensor''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleSensor''' | ||
|- | |- | ||
Revision as of 14:17, 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 | |