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 (136723 times)
  2. FAT32 Library (69934 times)
  3. Network Ethernet Library (55939 times)
  4. USB Device Library (46265 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41169 times)
  7. GSM click (28979 times)
  8. PID Library (26412 times)
  9. mikroSDK (26357 times)
  10. microSD click (25359 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: 1494 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

Perfect Envirenment - Demo project

0

Turtle Terrarium is the ideal housing for aquatic turtles and other marine reptiles, amphibians, and invertebrates. This application is using several sensors which show their values on TFT Capacitive Board, refreshed every few seconds.

[Learn More]

Hall Current 6 click

0

Hall Current 6 Click is a very accurate current measurement Click board™, based on the ACS723 IC. This IC is a galvanically isolated current sensor, which utilizes the Hall-effect principle.

[Learn More]

Buck click

1

BUCK click is a buck switching regulator that accepts a wide input voltage range of up to 40V and steps it down to 3.3V or 5V. The click carries the LT3976 40V, 5A, 2MHz step-down switching regulator with 3.3µA quiescent current.

[Learn More]