TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136657 times)
  2. FAT32 Library (69885 times)
  3. Network Ethernet Library (55913 times)
  4. USB Device Library (46246 times)
  5. Network WiFi Library (41881 times)
  6. FT800 Library (41120 times)
  7. GSM click (28970 times)
  8. PID Library (26405 times)
  9. mikroSDK (26338 times)
  10. microSD click (25349 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Temp-Hum 13 click

Rating:

10

Author: MIKROE

Last Updated: 2019-07-02

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 3012 times

Not followed.

License: MIT license  

Temp&amp;Hum 13 Click is a Click board which is perfectly suited for measuring the relative humidity (RH) and temperature. The Click boardâ„¢ is equipped with the HTU21DF, an accurate and reliable sensor IC, packed in a miniature 3x3mm DFN package.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Temp-Hum 13 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Hum 13 click" changes.

Do you want to report abuse regarding "Temp-Hum 13 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Temp-Hum 13 click

Temp-Hum 13 click

Native view of the Temp-Hum 13 click board.

View full image
Temp-Hum 13 click

Temp-Hum 13 click

Front and back view of the Temp-Hum 13 click board.

View full image

Library Description

Library contains functions for getting temperature and humidity. Library contains functions for getting and setting user register. Library contains functions for changing resolution and soft reset. Library contains functions for enabling/disabling heater and OTP.

Key functions:

  • float temphum13_getTemperature(void) - This function issues hold temperature measurement command, calculates CRC for temperature value, compares two CRC values and calculates temperature value.
  • float temphum13_getHumidity(void) - This function issues hold humidity measurement, calculates CRC for humidity value, compares two CRC values and calculates humidity value.
  • void temphum13_setUserRegister( uint8_t register_content ) - sets user register content.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C and LOG modules.
  • Application Initialization - Initializes I2C driver and issues soft reset command
  • Application Task - Measures temperature and humidity values, checks if they are valid and logs them if they are
void applicationTask( )
{
    temperature = temphum13_getTemperature( );
    humidity = temphum13_getHumidity( );
    
    if (temperature != 65536.0)
    {
        FloatToStr( temperature, text );
        FloatCut( );
        mikrobus_logWrite( "> Temperature : ", _LOG_TEXT );
        mikrobus_logWrite( text, _LOG_TEXT );
        mikrobus_logWrite( celsius, _LOG_LINE );
    }

    if (humidity != 65536.0)
    {
        FloatToStr( humidity, text );
        FloatCut( );
        mikrobus_logWrite( "> Humidity    : ", _LOG_TEXT );
        mikrobus_logWrite( text, _LOG_TEXT );
        mikrobus_logWrite( " %RH", _LOG_LINE );
    }
    
    mikrobus_logWrite( " ", _LOG_LINE );
    Delay_ms(500);
}

Additional Functions :

  • FloatCut() - Rounds float number to two decimals

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 clickUSB 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.

ALSO FROM THIS AUTHOR

Dual EE click

5

Dual EE Click contains two AT24CM02 EEPROM ICs onboard which gives total of 4MB of memory. Each memory IC can be addressed through the I2C interface with the transfer speed of 400KHz.

[Learn More]

6DOF IMU 15 click

0

6DOF IMU 15 Click is a compact add-on board that contains a 6-axis MEMS motion tracking device combining a 3-axis gyroscope and a 3-axis accelerometer.

[Learn More]

AD-SWIO click

5

AD-SWIO Click is a quad-channel software configurable input/output solution based on AD74412R, for building and process control application. The AD74412R is a quad-channel software configurable input/output solution for building and process control applications.

[Learn More]