TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (388 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 codes)
  5. Bugz Bensce (97 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 (140338 times)
  2. FAT32 Library (72734 times)
  3. Network Ethernet Library (57856 times)
  4. USB Device Library (48009 times)
  5. Network WiFi Library (43575 times)
  6. FT800 Library (43016 times)
  7. GSM click (30170 times)
  8. mikroSDK (28813 times)
  9. PID Library (27071 times)
  10. microSD click (26598 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

Thermo 22 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: Temperature & humidity

Downloaded: 190 times

Not followed.

License: MIT license  

Thermo 22 Click is a compact add-on board that provides an accurate temperature measurement. This board features the TMP75C, a high-precision digital temperature sensor from Texas Instruments. The TMP75C houses an integrated digital temperature sensor with a 12-bit analog-to-digital converter (ADC), a reference circuit, and serial interface logic functions in one package. Characterized by its high accuracy (up to ±0.25°C typical) and high resolution of 0.0625°C, this temperature sensor provides temperature data to the host controller with a configurable I2C interface. This Click board™ is appropriate for thermal management and protection of various consumer, industrial, and environmental applications.

No Abuse Reported
  • Information
  • Comments (0)

mikroSDK Library Blog


Thermo 22 Click

Thermo 22 Click is a compact add-on board that provides an accurate temperature measurement. This board features the TMP75C, a high-precision digital temperature sensor from Texas Instruments. The TMP75C houses an integrated digital temperature sensor with a 12-bit analog-to-digital converter (ADC), a reference circuit, and serial interface logic functions in one package. Characterized by its high accuracy (up to ±0.25°C typical) and high resolution of 0.0625°C, this temperature sensor provides temperature data to the host controller with a configurable I2C interface. This Click board™ is appropriate for thermal management and protection of various consumer, industrial, and environmental applications.

thermo22_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jan 2022.
  • Type : I2C type

Software Support

We provide a library for the Thermo 22 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Thermo 22 Click driver.

Standard key functions :

  • thermo22_cfg_setup Config Object Initialization function.

    void thermo22_cfg_setup ( thermo22_cfg_t *cfg );
  • thermo22_init Initialization function.

    err_t thermo22_init ( thermo22_t *ctx, thermo22_cfg_t *cfg );
  • thermo22_default_cfg Click Default Configuration function.

    err_t thermo22_default_cfg ( thermo22_t *ctx );

Example key functions :

  • thermo22_read_temperature This function reads the temperature data in Celsius.

    err_t thermo22_read_temperature ( thermo22_t *ctx, float *temperature );
  • thermo22_set_temperature_high_limit This function sets the temperature high limit at which the overtemperature alert flag is being set.

    err_t thermo22_set_temperature_high_limit ( thermo22_t *ctx, float high_limit );
  • thermo22_get_int_pin This function returns the INT pin logic state which indicates the overtemperature alert.

    uint8_t thermo22_get_int_pin ( thermo22_t *ctx );

Example Description

This example demonstrates the use of Thermo 22 Click board by reading and displaying the temperature measurements.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration which enables continuous conversation and sets the overtemperature limits to 35.0 Celsius.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    thermo22_cfg_t thermo22_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    thermo22_cfg_setup( &thermo22_cfg );
    THERMO22_MAP_MIKROBUS( thermo22_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == thermo22_init( &thermo22, &thermo22_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( THERMO22_ERROR == thermo22_default_cfg ( &thermo22 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Reads the temperature measurement in Celsius and displays the results on the USB UART every 200ms approximately. It also checks the overtemperature alert indicator and displays an appropriate message if the indicator is active.

void application_task ( void )
{
    float temperature;
    if ( THERMO22_OK == thermo22_read_temperature ( &thermo22, &temperature ) )
    {
        log_printf ( &logger, " Temperature: %.2f C \r\n\n", temperature );
        if ( !thermo22_get_int_pin ( &thermo22 ) )
        {
            log_printf ( &logger, " Over temperature alert! \r\n\n" );
        }
        Delay_ms ( 200 );
    }
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Thermo22

Additional notes and informations

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

BLE 9 Click

0

BLE 9 Click is a fully embedded stand-alone Bluetooth 5.2 Energy connectivity module, equipped with the EFR32BG22 Series 2 Modules, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M33 CPU microprocessor with FPU, and state-of-the-art power performance. Reliable and easy to use, BLE 9 Click is a perfect solution for development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.

[Learn More]

6DOF IMU 21 Click

0

6DOF IMU 21 Click is a compact add-on board perfect for applications requiring accurate orientation and movement detection. This board features the WSEN-ISDS (2536030320001) sensor from Würth Elektronik, which integrates 3-axis acceleration and gyroscope sensors using advanced MEMS-based capacitive sensing technology. It offers a fully calibrated 16-bit digital output, with acceleration ranges from ±2g to ±16g and gyroscope ranges from ±125dps to ±2000dps, alongside a high output data rate of up to 6.6kHz for seamless movement tracking. Additionally, an embedded temperature sensor provides environmental monitoring capabilities.

[Learn More]

Spectral click

5

Spectral click is a light multispectral sensing device, which uses the state-of-the-art sensor IC for a very accurate true-color sensing. Spectral click provides a direct reading of the XYZ color coordinates, consistent with the CIE 1931 2. standard color space.

[Learn More]
Close menu