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-02-08
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 4321 times
Not followed.
License: MIT license
Temp-Hum 9 click is a smart temperature and humidity sensing click board, packed with features that allow simple integration into any design.
Do you want to subscribe in order to receive notifications regarding "Temp-Hum 9 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Hum 9 click" changes.
Do you want to report abuse regarding "Temp-Hum 9 click".
Library Description
Library contains.
Key functions:
void temphum9_readRegister( uint16_t registerAddress_, uint8_t nData_, uint16_t *registerBuffer_ )
- reads one or two 16-bit registers.void temphum9_sendCommand( uint16_t command_ )
- issues (sends) command to device.void temhum9_getTemperatureAndHumidity( uint8_t mode_, float *measurementData)
- performs temperature and relative humidity measurement and calculates temperature and relative humidity.Examples description
The application is composed of three sections :
void applicationTask( )
{
mikrobus_logWrite( " ", _LOG_LINE );
temhum9_getTemperatureAndHumidity( _TEMPHUM9_NORMAL_MODE, &measurementData[0] );
FloatToStr( measurementData[0], text );
mikrobus_logWrite( "> > > Temperature : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " C", _LOG_LINE );
FloatToStr( measurementData[1], text );
mikrobus_logWrite( "> > > Relative humidity : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " %", _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 clickor 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.