thermo11  2.0.0.0
Main Page

Thermo 11 click

Thermo 11 Click is a Click board™ equipped with the sensor IC, which can digitize temperature measurements between -55°C and +150°C so that the temperature measurement data can be processed by the host MCU.

click Product page


Click library

Software Support

We provide a library for the Thermo11 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for Thermo11 Click driver.

Standard key functions :

Example key functions :

Examples Description

The application measures temperature

The demo application is composed of two sections :

Application Init

Initializes I2C serial interface and performs a software reset command

void application_init ( void )
{
log_cfg_t log_cfg;
// Logger initialization.
log_cfg.level = LOG_LEVEL_DEBUG;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
THERMO11_MAP_MIKROBUS( cfg, MIKROBUS_1 );
thermo11_init( &thermo11, &cfg );
thermo11_sw_reset( &thermo11 );
thermo11_default_cfg( &thermo11 );
log_printf( &logger, "** Thermo 11 is initialized ** \r\n" );
log_printf( &logger, "************************************************ \r\n \r\n" );
Delay_ms( 500 );
}

Application Task

Waits until data was ready and conversion cycle was done, and then reads

void application_task ( void )
{
uint8_t response_check;
float temperature;
response_check = thermo11_get_int( &thermo11 );
while ( response_check == THERMO11_FLAG_IS_CLEARED )
{
response_check = thermo11_get_int( &thermo11 );
}
temperature = thermo11_get_temp( &thermo11, THERMO11_TEMPERATURE_REG );
response_check = thermo11_check_status( &thermo11 );
log_printf( &logger, "*Temperature is: %.2f \r\n", temperature );
if ( ( response_check & THERMO11_HIGH_ALERT_FLAG ) != THERMO11_FLAG_IS_CLEARED )
{
log_printf( &logger, "*HIGH limit detection! \r\n" );
}
if ( ( response_check & THERMO11_LOW_ALERT_FLAG ) != THERMO11_FLAG_IS_CLEARED )
{
log_printf( &logger, "*LOW limit detection! \r\n" );
}
}

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.