TOP Contributors

  1. MIKROE (2752 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139065 times)
  2. FAT32 Library (71594 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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 4 click

Rating:

5

Author: MIKROE

Last Updated: 2020-08-03

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 1815 times

Not followed.

License: MIT license  

Thermostat 4 Click is complete solution that senses the temperature of a physical system and can performs actions so that the system's temperature is maintained near a desired setpoint.

No Abuse Reported

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

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

Do you want to report abuse regarding "Thermostat 4 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

Thermostat 4 Click

Thermostat 4 Click

Native view of the Thermostat 4 Click board.

View full image
Thermostat 4 Click

Thermostat 4 Click

Front and back view of the Thermostat 4 Click board.

View full image

Library Description

The library contains basic functions for working with Thermostat 4 click.

Key functions:

  • void thermostat4_relay_ctrl( uint8_t state ) - Relay Control
  • uint8_t thermostat4_hot_alert_state( void ) - Hot temperature ALERT
  • uint8_t thermostat4_warm_alert_state( void ) - Warm temperature ALERT

Examples description

The application is composed of three sections :

  • System Initialization - Initializes SPI module and all necessary GPIO pins
  • Application Initialization - Initializes Driver init, Relay test and sets hysteresis on the WARM channel ( channel B ), after thet starts uploading new data.
  • Application Task - Reads Alert on the WARM and HOT channel.
  • note: The user has the option of adjusting the hysteresis for channel B via the SPI module while for channel A it is adjusted via the potentiometer.
void application_task ( )
{
    if ( thermostat4_hot_alert_state( ) == THERMOSTAT4_HOT_ALERT )
    {
        mikrobus_logWrite( ">> H-O-T  A-L-E-R-T <<", _LOG_LINE );
        thermostat4_relay_ctrl( THERMOSTAT4_RELAY_ON );
    }
    if ( thermostat4_warm_alert_state( ) == THERMOSTAT4_WARM_ALERT )
    {
        mikrobus_logWrite( ">> W-A-R-M  A-L-E-R-T <<", _LOG_LINE );
        thermostat4_relay_ctrl( THERMOSTAT4_RELAY_ON );
    }

    mikrobus_logWrite( ">> T-E-M-P-E-R-A-T-U-R-E  O-K <<", _LOG_LINE );
    thermostat4_relay_ctrl( THERMOSTAT4_RELAY_OFF );
    Delay_ms( 200 );
}

Other mikroE Libraries used in the example:

  • SPI Library
  • UART Library

Additional notes and informations

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

BUCK 7 Click

0

Buck 7 Click is a high-efficiency buck (step-down) DC-DC converter, which can provide digitally adjusted step-down voltage on its output while delivering up to 3.5A of current.

[Learn More]

BattMon click

5

BATT-MON Click is a very versatile, high accuracy, multiple-chemistry battery gauge for applications single-cell batteries.

[Learn More]

GNSS Click

0

GNSS Click carries Quectel’s L86 GNSS module with a patch antenna along with an external antenna connector.

[Learn More]