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]
Rating:
Author: MIKROE
Last Updated: 2020-02-21
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 2563 times
Not followed.
License: MIT license
The Thermo 17 Click is a Click boardâ„¢ based on the TMP451-Q1, a high-accuracy, lowpower remote temperature sensor monitor with a built-in local temperature sensor from Texas Instruments.
Do you want to subscribe in order to receive notifications regarding "Thermo 17 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Thermo 17 click" changes.
Do you want to report abuse regarding "Thermo 17 click".
Library Description
Library probides functions for reading from and writing to device, and additional function for reading temperature value from sensor.
Key functions:
void thermo17_generic_write ( uint8_t reg_adr, uint8_t write_data )
- Function for writing datauint8_t thermo17_generic_read ( uint8_t reg_adr )
- Function for reading datafloat thermo17_read_temp ( uint8_t temp_macro )
- Function for reading temperature from deviceExamples description
The application is composed of three sections :
void application_task ( )
{
float read_data;
char txt_out[ 30 ];
read_data = thermo17_read_temp( THERMO17_TEMPERATURE_LOCAL );
FloatToStr( read_data, txt_out );
mikrobus_logWrite( " - LOCAL: ", _LOG_TEXT );
mikrobus_logWrite( txt_out, _LOG_LINE );
Delay_ms( 100 );
read_data = thermo17_read_temp( THERMO17_TEMPERATURE_REMOTE );
FloatToStr( read_data, txt_out );
mikrobus_logWrite( " - REMOTE: ", _LOG_TEXT );
mikrobus_logWrite( txt_out, _LOG_LINE );
Delay_ms( 100 );
mikrobus_logWrite( " ******************** ", _LOG_LINE );
Delay_ms( 1000 );
}
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.