tds 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

TDS Click Example. More...

#include "board.h"
#include "log.h"
#include "tds.h"

Functions

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

Detailed Description

TDS Click Example.

Description

This example demonstrates the usage of the TDS Click board, which measures the Total Dissolved Solids (TDS) in water. The application initializes the TDS Click board, establishes communication, and continuously reads the TDS value in parts per million (ppm).

The demo application is composed of two sections:

Application Init

Initializes the logger and configures the TDS Click board. It sets up communication using either ADC or I2C, verifies proper initialization, and prepares the device for measurement.

Application Task

Continuously reads the TDS value from the sensor and logs it in ppm (parts per million).

Note
Ensure a proper TDS probe is attached to the Click board for accurate measurements.
Author
Stefan Filipovic

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 )