|
|
| (11 intermediate revisions by 2 users not shown) |
| Line 17: |
Line 17: |
| ==Component Source Code== | | ==Component Source Code== |
|
| |
|
| Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_DHT11.fcfx FC_Comp_Source_DHT11.fcfx] | | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DHT11.fcfx FC_Comp_Source_DHT11.fcfx] |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DHT11.fcfx FC_Comp_Source_DHT11.fcfx] | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DHT11.fcfx FC_Comp_Source_DHT11.fcfx] |
| Line 38: |
Line 38: |
|
| |
|
|
| |
|
|
| |
|
| |
|
| |
| ''No detailed description exists yet for this component''
| |
|
| |
| ==Examples==
| |
|
| |
|
|
| |
|
| Line 51: |
Line 45: |
|
| |
|
|
| |
|
| | ''No detailed description exists yet for this component'' |
|
| |
|
| | ==Examples== |
|
| |
|
|
| |
|
| Line 64: |
Line 60: |
|
| |
|
|
| |
|
| Example Program showing how to sample the DHT11 sensor and show the temperature and humidity on an LCD.
| |
| {{Fcfile|DHT11_Example.fcfx|DHT11 Example}}
| |
|
| |
|
| ==Macro reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempWhole'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityFloat'''
| |
| |-
| |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a floating point number.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempString'''
| |
| |-
| |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a string.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityString'''
| |
| |-
| |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a string.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityWhole'''
| |
| |-
| |
| | colspan="2" | Gets the whole number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 15.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | Example Program showing how to sample the DHT11 sensor and show the temperature and humidity on an LCD. |
| |-
| | {{Fcfile|DHT11_Example.fcfx|DHT11 Example}} |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempReal'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |- | |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |} | |
|
| |
|
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityReal'''
| |
| |-
| |
| | colspan="2" | Gets the real number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 8.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleSensor'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloat'''
| |
| |-
| |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a floating point number.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
|
| |
|
|
| |
|
| ==Property reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | Data Pin
| |
| |-
| |
| | colspan="2" | Microcontroller I/O Pin connected to the DHT11 sensor data pin.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Use 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="90%" | Clock Adjustment
| |
| |-
| |
| | 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.
| |
| |}==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempWhole'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetHumidityFloat=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityFloat''' | | | width="90%" class="mtx-class-macrohead" | '''GetHumidityFloat''' |
| |- | | |- |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a floating point number. | | | colspan="2" | Gets the humidity returned by calling SampleSensor as a floating point number. |
| Line 242: |
Line 101: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetHumidityReal=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempString''' | | | width="90%" class="mtx-class-macrohead" | '''GetHumidityReal''' |
| |- | | |- |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a string. | | | colspan="2" | Gets the real number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 8. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetHumidityString=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityString''' | | | width="90%" class="mtx-class-macrohead" | '''GetHumidityString''' |
| |- | | |- |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a string. | | | colspan="2" | Gets the humidity returned by calling SampleSensor as a string. |
| Line 268: |
Line 129: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetHumidityWhole=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityWhole''' | | | width="90%" class="mtx-class-macrohead" | '''GetHumidityWhole''' |
| |- | | |- |
| | colspan="2" | Gets the whole number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 15. | | | colspan="2" | Gets the whole number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 15. |
| Line 281: |
Line 143: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===GetTempFloat=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempReal'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityReal'''
| |
| |-
| |
| | colspan="2" | Gets the real number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 8.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleSensor'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloat''' | | | width="90%" class="mtx-class-macrohead" | '''GetTempFloat''' |
| |- | | |- |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a floating point number. | | | colspan="2" | Gets the temperature returned by calling SampleSensor as a floating point number. |
| Line 333: |
Line 157: |
|
| |
|
|
| |
|
| | | ===GetTempReal=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''GetTempReal''' |
| |- | | |- |
| |-
| | | colspan="2" | 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. |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | Data Pin
| |
| |-
| |
| | colspan="2" | Microcontroller I/O Pin connected to the DHT11 sensor data pin.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Use 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="90%" | Clock Adjustment
| |
| |-
| |
| | 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.
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempWhole'''
| |
| |-
| |
| | colspan="2" | 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. | |
| |- | | |- |
| |- | | |- |
| Line 376: |
Line 171: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===GetTempString=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityFloat''' | |
| |-
| |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a floating point number.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempString''' | | | width="90%" class="mtx-class-macrohead" | '''GetTempString''' |
| |- | | |- |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a string. | | | colspan="2" | Gets the temperature returned by calling SampleSensor as a string. |
| Line 402: |
Line 185: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetTempWhole=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityString''' | | | width="90%" class="mtx-class-macrohead" | '''GetTempWhole''' |
| |- | | |- |
| | colspan="2" | Gets the humidity returned by calling SampleSensor as a string.
| | | colspan="2" | 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. |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityWhole'''
| |
| |-
| |
| | colspan="2" | Gets the whole number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 15. | |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempReal'''
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidityReal'''
| |
| |-
| |
| | colspan="2" | Gets the real number portion of the humidity returned by calling SampleSensor. If humidity is 15.8 % then this function would return 8.
| |
| |- | | |- |
| |- | | |- |
| Line 454: |
Line 199: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SampleSensor=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleSensor''' | | | width="90%" class="mtx-class-macrohead" | '''SampleSensor''' |
| |- | | |- |
| | colspan="2" | 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. | | | colspan="2" | 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. |
| Line 465: |
Line 211: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloat'''
| |
| |-
| |
| | colspan="2" | Gets the temperature returned by calling SampleSensor as a floating point number.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |- | | |- |
| Line 500: |
Line 231: |
| | 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="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Advanced Settings | | | width="90%" class="mtx-class-propfolder" | Advanced Settings |
| |- | | |- |
| |- | | |- |