TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 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 (139254 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57122 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 1865 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

HTU21D click

5

This example demonstrates reading from HTU21D click sensor. Temperature and humidity values are sent via UART. Use UART Terminal tool to view results.

[Learn More]

NINA-W152 Click

0

NINA-W152 Click is a compact add-on board designed for seamless integration of Wi-Fi and Bluetooth communication into your projects. Based on the NINA-W152 multi-radio module from u-blox, this Click board™ provides dual-mode wireless connectivity, including Wi-Fi 802.11b/g/n and Bluetooth BR/EDR v4.2+EDR and Bluetooth Low Energy v4.2. It features an internal PIFA antenna for optimal performance and supports communication through UART and SPI interfaces, with secure boot and enterprise-level security protocols (WPA2/WPA3) ensuring reliable operation.

[Learn More]

Gyro 3 Click

0

Gyro 3 Click is a three-axis gyroscope Click board™ that can sense motion over three perpendicular axes. It is equipped with the I3G4250, a three-axis digital gyroscope.

[Learn More]