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-02-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 3497 times
Not followed.
License: MIT license
Temp-Log 4 Click is a temperature measuring Click board featuring the SE97B IC, an accurate temperature sensor IC with integrated EEPROM. Besides the thermal sensor, this IC is equipped with additional 256 bytes of EEPROM, integrated on the same die.
Do you want to subscribe in order to receive notifications regarding "Temp-Log 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Log 4 click" changes.
Do you want to report abuse regarding "Temp-Log 4 click".
Library Description
The library performs a control of the Temp-Log 4 Click board. There are a functions that offer a choice to measure the ambient temperature and set a temperature limit values to generate alarm. The library also can save a desired configurations or temperature values to the EEPROM, which has size of 256 bytes. For more details check documentation.
Key functions:
T_TEMPLOG4_RETVAL templog4_writeReg( uint8_t regAddr, uint16_t dataIn )
- Function writes a 16bit data to the desired register.void templog4_repeatedRead( uint16_t *dataOut )
- Function reads a 16bit data from the register on which the internal address pointer was last set.T_TEMPLOG4_RETVAL templog4_getTemp( uint8_t tempSel, T_TEMPLOG4_DEG *tempOut )
- Function gets a temperature value from the desired temperature register calculated to the Celsius degrees.T_TEMPLOG4_RETVAL templog4_setTemp( uint8_t tempSel, T_TEMPLOG4_DEG tempIn )
- Function sets a desired temperature register on the desired value calculated to the Celsius degrees.Examples description
The application is composed of the three sections :
void applicationTask()
{
templog4_waitConvDone();
retStatus = templog4_getTemp( _TEMPLOG4_TEMP_AMBIENT_REG, &temperature );
FloatToStr( temperature, text );
floatCut();
mikrobus_logWrite( "** Ambient temperature is : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
logUnit();
mikrobus_logWrite( " **", _LOG_LINE );
checkLimitStatus();
Delay_ms( 300 );
}
Additional Functions :
Other mikroE Libraries used in the example:
Conversions
I2C
UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.