Temp&Hum 14 Click Board
Temp&Hum 14 Click Board
The Temp & Hum 14 Click Board™ is a compact add-on board that contains one of the smallest and most accurate humidity and temperature sensors on the market. This board features the HTU31D , a highly accurate digital relative humidity sensor with temperature output from TE Connectivity Measurement Specialties. With power consumption down to 3.78μW and accuracy of ±2%RH and ±0.2°C, this Click Board™ provides fast response time, precision measurement, low hysteresis, and sustained performance even when exposed to extreme temperature up to 125°C and humidity environments.
The Temp & Hum 14 Click Board™ is suitable for relative humidity and temperature measuring applications, including weather stations, reliable monitoring systems, and more. Temp & Hum 14 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the Temp & Hum 14 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control Temp&Hum 14 Click board™. Library performs a standard I2C interface communication.
Key Functions
void temphum14_set_conversion ( uint8_t hum_osr, uint8_t temp_osr )
- Set conversion function.void temphum14_get_diagnostic ( temphum14_diagn_t *diag_data )
- Get diagnostic status function.void temphum14_get_temp_and_hum ( float *temp, float *hum )
- Get temperature and humidity data function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C, set RST as output and start to write log.
- Application Initialization - Initialization driver enables - I2C, hardware reset the device and read the serial number, also write log.
- Application Task - (code snippet) This is an example that demonstrates the use of the Temp & Hum 14 Click board™. Temp & Hum 14 Click board™ can be used to measure temperature and relative humidity. All data logs write on USB UART changes every 3 sec.
void application_task ( ) { temphum14_set_conversion( TEMPHUM14_CONVERSION_HUM_OSR_0_020, TEMPHUM14_CONVERSION_TEMP_0_040 ); Delay_ms( 10 ); temphum14_get_temp_and_hum( &temperature, &humidity ); Delay_ms( 10 ); FloatToStr( temperature, log_text ); mikrobus_logWrite( " Temperature : ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); FloatToStr( humidity, log_text ); mikrobus_logWrite( " Humidity : ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " %", _LOG_LINE ); mikrobus_logWrite( "-----------------------------", _LOG_LINE ); Delay_ms( 3000 ); }
Additional Functions :
- void display_diagnostic ( void ) - Display diagnostic.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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.
MIKROSDK
The Temp & Hum 14 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Temp&Hum 14 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.