thermostat5 2.1.0.0
Loading...
Searching...
No Matches
main.c File Reference

Thermostat 5 Click Example. More...

#include "board.h"
#include "log.h"
#include "thermostat5.h"

Macros

#define THERMOSTAT5_TEMPERATURE_LIMIT   30.0
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Thermostat 5 Click Example.

Description

This library contains API for the Thermostat 5 Click driver for temperature measurement and relay control.

The demo application is composed of two sections :

Application Init

The initialization of the I2C or ADC module and log UART set the relay to an OFF state.

Application Task

The demo application measures temperature in degrees Celsius. If the temperature increases above 30 degrees Celsius, the relay will turn ON, otherwise it will turn OFF. Results are being sent to the UART Terminal, where you can track their changes.

Note
For temperature measurement, we used Semitec 103AT-2 NTC Thermistors.
  • Beta parameter: 3435 K
  • Resistance: 10 kOhms
  • Tolerance: 1 %
Author
Nenad Filipovic

Macro Definition Documentation

◆ THERMOSTAT5_TEMPERATURE_LIMIT

#define THERMOSTAT5_TEMPERATURE_LIMIT   30.0

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )