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: 2019-06-10
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 3861 times
Not followed.
License: MIT license
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.
Do you want to subscribe in order to receive notifications regarding "Thermo 11 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Thermo 11 click" changes.
Do you want to report abuse regarding "Thermo 11 click".
Library Description
This library allows user to get ambient temperature value in the range from -256 to +255.9921875 Celsius degrees. The user also can perform the desired device configurations by using this library. The device control is allowed by using the I2C serial interface. For more details check documentation.
Key functions:
T_THERMO11_RETVAL thermo11_writeReg( uint8_t regAddr, uint16_t dataIn )
- This function writes a 16bit data to the desired register.float thermo11_getTemp( uint8_t tempAddr )
- This function returns the temperature value converted to the Celsius degrees.T_THERMO11_RETVAL thermo11_setTemp( uint8_t tempAddr, float tempValue )
- This function allows user to set the desired temperature register on the desired value.Examples description
The application is composed of three sections :
void applicationTask()
{
responseCheck = thermo11_getINT();
while (responseCheck == _THERMO11_FLAG_IS_CLEARED)
{
responseCheck = thermo11_getINT();
}
temperature = thermo11_getTemp( _THERMO11_TEMPERATURE_REG );
responseCheck = thermo11_checkStatus();
FloatToStr( temperature, text );
floatCut();
mikrobus_logWrite( "* Temperature is ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( logUnit, _LOG_LINE );
if ((responseCheck & _THERMO11_HIGH_ALERT_FLAG) != _THERMO11_FLAG_IS_CLEARED)
{
mikrobus_logWrite( "* HIGH limit detection!", _LOG_LINE );
}
if ((responseCheck & _THERMO11_LOW_ALERT_FLAG) != _THERMO11_FLAG_IS_CLEARED)
{
mikrobus_logWrite( "* LOW limit detection!", _LOG_LINE );
}
mikrobus_logWrite( "********************************************", _LOG_LINE );
}
Additional Functions :
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.