TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136734 times)
  2. FAT32 Library (69950 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46266 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26360 times)
  10. microSD click (25375 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 click

Rating:

5

Author: MIKROE

Last Updated: 2018-02-14

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 4822 times

Not followed.

License: MIT license  

Temp-Log click uses for temperature measurement. This click reads temperature and shows this temperature data in decimal and celsius value with determined resolution. Temp-Log click also has ALERT pin for checking high temperature limit.

No Abuse Reported

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

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

Do you want to report abuse regarding "Temp-Log 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 Click

Temp-Log Click

Native view of the Temp-Log Click board.

View full image
Temp-Log Click

Temp-Log Click

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

View full image

Library Description

Initializes and defines I2C driver, defines driver's function which writes data in registers, reads data from registers, reads and converts temperature to Celsius value with determined resolution, and checks Alert pin for temperature limit.

Key functions

Function writes 8-bit or 16-bit data in register- Function writes 8-bit or 16-bit data in register

uint16_t temp_log_readReg(uint8_t register_address);- Function reads 16-bit data from register

uint16_t temp_log_readTempDec(uint16_t resolution);- Function reads 16-bit temperature data from register with determined resolution

float temp_log_convertToCelsius(uint16_t temperature_data);- Function converts 16-bit temperature data to Celsius value

uint8_t temp_log_getAlert();- Function checks state of Alert pin (ALT)

Example description

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes click driver.
  • Application Task - Reads temperature from the temperature register in decimal value in 9-bit resolution, converts that decimal value in Celsius value and checks Alert pin which becomes active (low) if the measured temperature meets or exceeds the high temperature limit.
void applicationTask()
{
    uint16_t temperature = 0;
    float temp = 0;
    uint16_t temp_limit = 0;
    char txt[4] = {0};
    char txt1[10] = {0};

    temperature = temp_log_readTempDec(_TEMP_LOG_RESOLUTION_9_BITS);
    temp = temp_log_convertToCelsius(temperature);

    IntToStr(temperature, txt);
    mikrobus_logWrite("Temperature in decimal value is: ", _LOG_TEXT);
    mikrobus_logWrite(txt, _LOG_LINE);

    FloatToStr(temp, txt1);
    mikrobus_logWrite("Temperature in celsius value is: ", _LOG_TEXT);
    mikrobus_logWrite(txt1, _LOG_LINE);

    if(temp_log_getAlert() == 0)
    {
        mikrobus_logWrite("TEMPERATURE LIMIT ALARMING!", _LOG_LINE);
    }

    Delay_ms(1000);
}

Additional notes and information

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

AudioAmp 4 click

0

AudioAmp 4 click is a low-power audio amplifier with a digital volume control. It is equipped with the LM4860, an audio amplifier IC capable of delivering up to 1W of continuous power to an 8 Ω load.

[Learn More]

MiWi 2 click

0

MiWi 2 click is a sub-gigahertz radio transceiver click board, which offers a reliable FSK or OOK communication solution, with the maximum data rates of 200kbps and 40kbps, respectively.

[Learn More]

Flash 8 click

0

Flash 8 Click is a compact add-on board representing a highly reliable memory solution. This board features the GD5F2GQ5UEYIGR, a 2Gb high-density non-volatile memory storage solution for embedded systems from GigaDevice Semiconductor. It is based on an industry-standard NAND Flash memory core, representing an attractive alternative to SPI-NOR and standard parallel NAND Flash with advanced features. The GD5F2GQ5UEYIGR also has advanced security features (8K-Byte OTP region), software/hardware write protection, can withstand many write cycles (minimum 100k), and has a data retention period greater than ten years.

[Learn More]