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 (136639 times)
  2. FAT32 Library (69848 times)
  3. Network Ethernet Library (55897 times)
  4. USB Device Library (46232 times)
  5. Network WiFi Library (41868 times)
  6. FT800 Library (41093 times)
  7. GSM click (28947 times)
  8. PID Library (26402 times)
  9. mikroSDK (26320 times)
  10. microSD click (25330 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

Thermostat click

Rating:

1

Author: MIKROE

Last Updated: 2019-01-15

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 3660 times

Not followed.

License: MIT license  

Thermostat click carries the MAX7502 IC digital temperature sensor, that also provides an overtemperature alarm/interrupt/shutdown output, and an SN74LVC1G126 single bus buffer from Texas Instruments. MAX7502 IC can measure temperatures from -25°C to +100°C, within the accuracy of ±1.5°C.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Thermostat click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Thermostat click" changes.

Do you want to report abuse regarding "Thermostat click".

  • mikroSDK Library 2.0.0.0
  • Comments (1)
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

Thermostat click

Thermostat click

Front and back view of the Thermostat click board.

View full image

Library Description

The library covers all the necessary functions to control Thermostat Click board. Library performs the communication with the device via I2C driver by writting to registers and by reading from registers. Library have generic write and read function, function for set configuration,  temperature hysterezis and referent temperature, function for get temperature value, etc. Function who gets temperature also converts temperature data to degree Celsius [ °C ] and  Fahrenheit [ °F ].

Key functions:

  • float thermostat_getTemperature() - Get temperature in degrees Celsius function.
  • void thermostat_setConfiguration( uint16_t configValue ) - Set configuration function.
  • void thermostat_setTempHyst( int8_t tempHyst ) - Set temperature hysterezis function.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes GPIO, I2C and LOG structures and set CS and RST pins as output.
  • Application Initialization - Initialization driver enable's - I2C, soft reset sesnor, set default configuration and start write log.
  • Application Task - (code snippet) This is a example which demonstrates the use of Thermostat Click board. Thermostat Click measures the temperature value from sensor in degrees Celsius [ °C ] and set on thermal switch when the temperature is within the defined limits. Results are being sent to the USART Terminal where you can track their changes.
    All data logs on usb uart for aproximetly every 2 sec.
void applicationTask()
{   
    temperature = thermostat_getTemperature();
    FloatToStr( temperature, logText );
    
    mikrobus_logWrite( " Temperature : ", _LOG_TEXT );
    mikrobus_logWrite( logText, _LOG_TEXT );
    mikrobus_logWrite( " °C", _LOG_LINE );

    if ( ( temperature < limitMax ) && ( temperature > limitMin ) )
    {
        thermostat_switchOn();
    }
    else
    {
        thermostat_switchOff();
    }
   
    mikrobus_logWrite( "----------------------", _LOG_LINE );
    Delay_ms( 2000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Speed Sense click

0

Speed Sense Click is a compact add-on board that allows you to measure the speed and rotation of a spinning object. This board features the A17501, a dual output differential speed and direction sensor from Allegro Microsystems. It has a high-speed switching bandwidth of up to 40kHz for two different signals. The sensor has two independent output channels with options for high-resolution XOR speed, pulse, and direction protocol.

[Learn More]

PWR Meter 2 click

0

PWR Meter 2 click is a compact and accurate power monitoring Click board™, capable of measuring and monitoring voltage up to 24V and current up to 5A.

[Learn More]

PCR click

0

PCR Click is a compact add-on board that allows you to use a pulsed coherent radar (PCR) in your application. This board features the XM125, the Entry+ PCR module from Acconeer. The XM125 uses an Acconeer A121 pulsed coherent radar system based on a patented PCR technology with picosecond time resolution.

[Learn More]