Temp&Hum 2 Click Board
Temp&Hum 2 Click Board
The Temp&Hum 2 Click Board™ is a smart temperature and humidity sensor Click Board™, packed with features, that allow easy and simple integration into any design that requires accurate and reliable humidity and temperature measurements. It measures a wide range of temperature and relative humidity values with a great accuracy. The Si7034 sensor IC from Silicon labs used on this Click Board™ utilises the patented industry-standard low-K polymeric dielectrics for humidity sensing. It allows low drift and, power consumption, low hysteresis, and excellent long-term stability.
Software Support
We provide a demo application for the Temp-Hum 2 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 initializes and defines the I2C bus driver and drivers that offer a choice for writing data in the register. The library includes the function for reads query device, electronic ID, firmware revision, temperature and humidity data. The user can select the measurement mode and set the Heater.
Key functions :
void temphum2_setMode(uint8_t selectMode, uint8_t speedMode)
- Functions for set measurement mode
void temphum2_getMeasurement( float *dataBuffer )
- Functions for measurement
void temphum2_writeByte(uint8_t reg, uint8_t _data)
- Functions for write one byte in register
Example Description
The application is composed of three sections:
- System Initialization - Initializes I2C module.
- Application Initialization - Initializes driver init, set work mode and Heater.
- Application Task - (code snippet) - Reads temperature and humidity and logs values on usbuart for every 500ms.
void applicationTask() { temphum2_getMeasurement( &dataBuffer[0] ); mikrobus_logWrite( " --- Temperature : ", _LOG_TEXT); FloatToStr( dataBuffer[0] , dataText); mikrobus_logWrite(dataText, _LOG_TEXT); mikrobus_logWrite( " C", _LOG_LINE); mikrobus_logWrite( " --- Humidity : ", _LOG_TEXT); FloatToStr( dataBuffer[1] , dataText); mikrobus_logWrite(dataText, _LOG_TEXT); mikrobus_logWrite( " %RH", _LOG_LINE); Delay_ms( 500 ); }
The full application pre, and ready to use projects can be found on our LibStock page.
mikroE Libraries used in the example:
- Conversions
- I2C
- UART
Additional Notes and Information
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.
MIKROSDK
The Temp-Hum 2 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 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.