We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-03-29
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 3466 times
Not followed.
License: MIT license
Temp-Hum 5 click is a temperature and humidity sensing click board, packed with features that allow simple integration into any design. It can measure a wide range of temperature and relative humidity values with high accuracy.
Do you want to subscribe in order to receive notifications regarding "Temp-Hum 5 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Hum 5 click" changes.
Do you want to report abuse regarding "Temp-Hum 5 click".
Library Description
The library includes function for read Temperature and Relative Huminidy data and function for start measurement. The user also has the function for reads HIGH or LOW alarm state.
Key functions:
uint8_t temphum5_startMeasurement()
- Functions for start measurementfloat temphum5_getTemperature(uint8_t tempIn)
- Functions for read Temperature datafloat temphum5_getHumidity()
- Functions for read Relative Huminidy dataExamples description
The application is composed of the three sections :
void applicationTask()
{
char demoText[ 50 ];
float Temperature;
float Humidity;
temphum5_startMeasurement();
Temperature = temphum5_getTemperature(_TEMPHUM5_TEMP_DATA_IN_CELSIUS);
FloatToStr(Temperature, demoText);
demoText[ 6 ] = 0;
mikrobus_logWrite(" Temperature : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite( " C", _LOG_LINE);
Humidity = temphum5_getHumidity();
FloatToStr(Humidity, demoText);
demoText[ 6 ] = 0;
mikrobus_logWrite(" Humidity : ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite( " RH", _LOG_LINE);
mikrobus_logWrite("------------------------", _LOG_LINE);
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
I2C
UART
Conversions
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.