TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137052 times)
  2. FAT32 Library (70177 times)
  3. Network Ethernet Library (56054 times)
  4. USB Device Library (46374 times)
  5. Network WiFi Library (41992 times)
  6. FT800 Library (41324 times)
  7. GSM click (29083 times)
  8. mikroSDK (26522 times)
  9. PID Library (26466 times)
  10. microSD click (25449 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Temp-Log 3 click

Rating:

5

Author: MIKROE

Last Updated: 2019-01-25

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 3607 times

Not followed.

License: MIT license  

Temp-Log 3 click is a temperature measuring Click board featuring the MCP9843 IC, an accurate temperature sensor IC with integrated EEPROM.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Temp-Log 3 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Temp-Log 3 click" changes.

Do you want to report abuse regarding "Temp-Log 3 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Temp-Log 3 Click

Temp-Log 3 Click

Native view of the Temp-Log 3 Click board.

View full image
Temp-Log 3 Click

Temp-Log 3 Click

Front and back view of the Temp-Log 3 Click board.

View full image

Library Description

The library performs a control of the Temp-Log 3 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_TEMPLOG3_RETVAL templog3_writeReg( uint8_t regAddr, uint16_t dataIn ) - Function writes a 16bit data to the desired register.
  • T_TEMPLOG3_RETVAL templog3_getTemp( uint8_t tempSel, T_TEMPLOG3_DEG *tempOut ) - Function gets a temperature value from the desired temperature register calculated to the Celsius degrees.
  • T_TEMPLOG3_RETVAL templog3_setTemp( uint8_t tempSel, T_TEMPLOG3_DEG tempIn ) - Function sets a desired temperature register on the desired value calculated to the Celsius degrees.
  • void templog3_eepromByteWrite( uint8_t regAddr, uint8_t dataIn, uint8_t eepromMode ) - Function writes a one byte data to the EEPROM including/excluding a write protection.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes I2C interface and performs a device configuration for properly working. Also sets the temperature limit to the desired values.
  • Application Task - (code snippet) - First ensures that the minimum conversion time is met, and then reads the ambient temperature calculated to the Celsius degrees. Also checks the limit status and shows a message when some limit condition is met. Note : The temperature range that can be measured or written is from -40 to +125 Celsius degrees. The user can change the measured temperature resolution, but the range remains the same. The limit temperature resolution is always a 10bit, or 0.25 Celsius degrees. If user wants to enable the EEPROM Write Protection, the A0 pin on the device must be set to the high voltage level.
void applicationTask()
{
    templog3_waitConvDone();

    retStatus = templog3_getTemp( _TEMPLOG3_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 :

  • floatCut - Makes that float values be rounded on two decimal places.
  • logUnit - Writes a Celsius degrees symbol on uart terminal.
  • checkLimitStatus - Checks the limit status for each temperature reading cycle and writes a message on uart terminal when some limit condition is met.

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 clickUSB 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.

ALSO FROM THIS AUTHOR

7x10 G click

5

7x10 G click can be used for displaying letters on display with 7x5 font resolution. It carries a matrix of 70 green LEDs driven by a pair of 8-bit serial-in, parallel-out shift registers, a Darlington Transistor array and a Johnson counter.

[Learn More]

NTAG 5 Link click

0

NTAG 5 Link Click is a compact add-on board that acts as a bridge between an NFC-enabled device and any I2C slave, such as a sensor or external memory. This board features the NTA5332, a highly integrated NFC IC which creates a secure standard-based link from the device to the cloud from NXP Semiconductors. Based on the NTAG 5 switch and operating at 13.56MHz, the NTA5332 represents an NFC Forum-compliant contactless tag that can be read and written by an NFC-enabled device at close range and by an ISO/IEC 15693-enabled industrial reader over a more extended range. It also incorporates an I2C interface with an I2C master features and AES mutual authentication, SRAM memory, and energy harvesting possibility, which means it can supply power to other components in the system.

[Learn More]

Remote Barcode Scanner

0

Simple remote barcode scanner demo application with two devices : - Display node - Scanner node

[Learn More]