thermo22 2.0.0.0
Main Page

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.

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 :

Example key functions :

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;
thermo22_cfg_t thermo22_cfg;
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 " );
}
#define THERMO22_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition thermo22.h:147
void application_init(void)
Definition main.c:31
@ THERMO22_ERROR
Definition thermo22.h:195

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 );
}
}
void application_task(void)
Definition main.c:67
@ THERMO22_OK
Definition thermo22.h:194

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.