TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136708 times)
  2. FAT32 Library (69919 times)
  3. Network Ethernet Library (55932 times)
  4. USB Device Library (46258 times)
  5. Network WiFi Library (41883 times)
  6. FT800 Library (41144 times)
  7. GSM click (28979 times)
  8. PID Library (26408 times)
  9. mikroSDK (26355 times)
  10. microSD click (25351 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: 4819 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

VCP Monitor 3 click

5

VCP Monitor 3 Click is a high precision Voltage, Current and Power measurement Click board with an input capable of taking up to 15V. It features the LTC2947, from Analog Devices, a high precision power and energy monitor with an internal sense resistor supporting up to ±30A.

[Learn More]

DAC 15 click

0

DAC 15 Click is a compact add-on board that provides a highly accurate digital-to-analog conversion on two channels. This board features the DAC80502, a dual 16-bit 1-LSB INL voltage-output DAC from Texas Instruments. The DAC operates at a wide power supply range and is a low-power device with as low as 1mA per channel at 5.5V. It also includes a 2.5V, 5-ppm/°C internal reference, giving a full-scale voltage buffered output ranges of 1.25V, 2.5V, and 5.5V.

[Learn More]

Pressure 11 click

0

This sensor offers many benefits, including low power consumption, high resolution of the pressure data, embedded thermal compensation, FIFO buffer with several operating modes, temperature measurement, etc.

[Learn More]