thermostat2 2.0.0.0
|
Thermostat 2 click is a general-purpose thermostat Click board™ designed to be used with any temperature sensor based on the DS1820 sensor design: 3-pin package with 1-Wire® communication interface.
We provide a library for the Thermostat 2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for Thermostat 2 Click driver.
thermostat2_cfg_setup
Config Object Initialization function. thermostat2_init
Initialization function. thermostat2_default_cfg
Click Default Configuration function. thermostat2_read_temperature
This function reads the temperature value in Celsius. thermostat2_relay_state
This function turns the relay on/off. This example demonstrates the use of Thermostat 2 click board by reading
and displaying the temperature in Celsius and turning the relay on/off depending on the temperature value. DS1820, DS18S20 and DS18B20 chips can be used in this example.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Reads and displays the temperature measured by the click board on the UART Terminal.
If the temperature goes beneath the THERMOSTAT2_TEMPERATURE_LIMIT, the relay will be turned off while otherwise it will be turned on. In both cases an appropriate message will be displayed on the terminal.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.