sht1x 2.0.0.0
main.c File Reference

SHT1x Click example. More...

#include "board.h"
#include "log.h"
#include "sht1x.h"

Functions

void sht1x_trans_start ()
 
uint8_t sht1x_read_byte (uint8_t ack)
 
uint8_t sht1x_write_byte (uint8_t value)
 
uint8_t sht1x_measure (uint16_t *p_val, uint8_t mode)
 
void sht1x_read_results (float *f_t, float *f_rh)
 
uint8_t sht1x_rd_stat_reg (uint8_t *p_val)
 
uint8_t sht1x_wr_stat_reg (uint8_t value)
 
void sht1x_connection_reset ()
 
uint8_t sht1x_soft_reset ()
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

SHT1x Click example.

Description

This click measures temperature and humidity.

The demo application is composed of two sections :

Application Init

Initialization driver enables GPIO.

Application Task

This example demonstrates the use of SHT1x Click board by measuring temperature and humidity, and displays the results on USART terminal.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )

◆ sht1x_connection_reset()

void sht1x_connection_reset ( )

◆ sht1x_measure()

uint8_t sht1x_measure ( uint16_t * p_val,
uint8_t mode )

◆ sht1x_rd_stat_reg()

uint8_t sht1x_rd_stat_reg ( uint8_t * p_val)

◆ sht1x_read_byte()

uint8_t sht1x_read_byte ( uint8_t ack)

◆ sht1x_read_results()

void sht1x_read_results ( float * f_t,
float * f_rh )

◆ sht1x_soft_reset()

uint8_t sht1x_soft_reset ( )

◆ sht1x_trans_start()

void sht1x_trans_start ( )

◆ sht1x_wr_stat_reg()

uint8_t sht1x_wr_stat_reg ( uint8_t value)

◆ sht1x_write_byte()

uint8_t sht1x_write_byte ( uint8_t value)