barometer3
2.0.0.0
|
Barometer 3 Click is a compact add-on board for applications which require digital barometric air pressure measurement. This board features the DPS368, a digital barometric air pressure sensor from Infineon.
We provide a library for the Barometer3 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Barometer3 Click driver.
void barometer3_cfg_setup ( barometer3_cfg_t *cfg );
BAROMETER3_RETVAL barometer3_init ( barometer3_t *ctx, barometer3_cfg_t *cfg );
void barometer3_def_cfg ( barometer3_t *ctx );
void barometer3_cfg_temp ( barometer3_t *ctx, uint8_t temp_mr, uint8_t temp_osr );
uint8_t barometer3_meas_temp_once ( barometer3_t *ctx, float *result, uint8_t temp_osr );
uint8_t barometer3_meas_prs_once ( barometer3_t *ctx, float *result, uint8_t prs_osr );
This example demonstrates the use of Barometer 3 Click board.
The demo application is composed of two sections :
Initializes the driver, sets the Click board default configuration and check the communication by reading the device ID.
Reads the temperature [ Celsius ] and pressure [ mBar ] and displays the results on the USB UART.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.