TOP Contributors

  1. MIKROE (2660 codes)
  2. Alcides Ramos (356 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 (137011 times)
  2. FAT32 Library (70135 times)
  3. Network Ethernet Library (56028 times)
  4. USB Device Library (46352 times)
  5. Network WiFi Library (41968 times)
  6. FT800 Library (41293 times)
  7. GSM click (29055 times)
  8. mikroSDK (26489 times)
  9. PID Library (26452 times)
  10. microSD click (25413 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: 1533 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

Multi Stepper TB67S102 click

0

Multi Stepper Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the TB67S102AFNG, CLOCK-in controlled bipolar stepping motor driver from Toshiba Semiconductor. It supports a PWM constant-current control drive and allows full-, half-, and quarter-step operation for less motor noise and smoother control. It has a wide operating voltage range of 10V to 47V with an output current capacity of 2.8A in addition to several built-in error detection circuits.

[Learn More]

LED Driver 12 click

0

LED Driver 12 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the PCA9532, a 16-bit I2C-configurable I/O expander optimized for dimming LEDs in 256 discrete Red/Green/Blue (RGB) steps from NXP Semiconductors. The PCA9532 offers high efficiency, supporting up to 16 LED channels and delivering a maximum of up to 25mA of LED current per channel. It contains an internal oscillator with two user-programmable blink rates and duty cycles coupled to the output PWM. Any bits not used for controlling the LEDs can be used for GPIO expansion, which provides a simple solution when additional I/O is needed for some sensors, push-buttons, or alarm monitoring. This Click board™ is suitable for color mixing and backlight application for amusement products, LED status signalization, home automation projects, and many more.

[Learn More]

LED Driver 10 click

0

LED Driver 10 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the TLC59283, a 16-channel, constant-current sink light-emitting diode (LED) driver with pre-charge FET from Texas Instruments.

[Learn More]