TOP Contributors

  1. MIKROE (2675 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Bugz Bensce (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 (137460 times)
  2. FAT32 Library (70457 times)
  3. Network Ethernet Library (56236 times)
  4. USB Device Library (46659 times)
  5. Network WiFi Library (42319 times)
  6. FT800 Library (41544 times)
  7. GSM click (29252 times)
  8. mikroSDK (26765 times)
  9. PID Library (26567 times)
  10. microSD click (25621 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: 3106 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

GainAMP 2 click

0

GainAMP 2 click is a 6-channel programmable gain amplifier, used to amplify signals on any of the 6 non-inverting input channels up to 32x, in eight discrete steps.

[Learn More]

Proximity 17 click

0

Proximity 17 Click is a compact add-on board that contains a close-range proximity sensing solution. This board features the TMD2635, a miniature proximity sensor module from ams AG. The TMD2635 features advanced proximity measurement in a tiny and thin optical land grid array module that incorporates a 940nm infrared vertical-cavity surface-emitting laser (IR VCSEL) factory calibrated for IR proximity response. It also offers advanced crosstalk noise cancellation through a wide range of offset adjustments through a digital fast-mode I2C interface to compensate for unwanted IR energy reflection at the sensor. This Click board™ is suitable for consumer and industrial applications.

[Learn More]

CAP Wheel 2 click

5

CAP Wheel 2 Click is a capacitive touch sensor with round-shaped electrodes integrated on a Click boardâ„¢. This click can sense touch even through plastic, wood, or other dielectric materials, which can be used to protect the surface of the PCB and the sensor pad trace itself.

[Learn More]