Jump to content

Component: Temp / Humidity (Grove 101020019) (101020019) (Environmental)

From Flowcode Help
Revision as of 11:03, 17 November 2021 by Wiki bot (talk | contribs)
Author Matrix TSL
Version 1.2
Category Environmental


Temp / Humidity (Grove 101020019) component

The DHT22 temperature and humidity sensor is a popular sensor allowing the ambient temperature and relative humidity to be monitored digitally. Humidity Range = 0% - 100% +/- 2% Temperature Range = -40 - 80 Degrees C +/- 0.5 Degrees C

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


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. 
[[File:]] - Return


GetHumidityFloat
Gets the humidity returned by calling SampleSensor as a floating point number. If humidity is 15.8 % then this function would return 15.8. 
[[File:]] - Return


GetTempString
Gets the temperature returned by calling SampleSensor as a string. If temperature is 15.8 degrees C then this function would return "15.8". 
- STRING Return


GetHumidityString
Gets the humidity returned by calling SampleSensor as a string. If humidity is 15.8 % then this function would return "15.8". 
- 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. 
[[File:]] - 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. 
[[File:]] - 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. 
[[File:]] - 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. 
- BYTE Return


GetTempFloat
Gets the temperature returned by calling SampleSensor as a floating point number. If temperature is 15.8 degrees C then this function would return 15.8. 
[[File:]] - Return



Property reference

Properties
SIG Pin
Microcontroller I/O Pin connected to the DHT11 sensor data pin. 
Use Checksum
The checksum value is used to ensure the data being received is correct. Yes = Only receive data if checksum is correct No = Ignore checksum 
Clock Adjustment
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. 
Connections
Simulations