pressure9
2.0.0.0
|
Pressure 9 click is a digital barometric air pressure sensor Click board™. It is equipped with the DPS422, barometric air pressure sensor, based on a capacitive sensor element.
We provide a library for the Pressure9 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 Pressure9 Click driver.
void pressure9_cfg_setup ( pressure9_cfg_t *cfg );
PRESSURE9_RETVAL pressure9_init ( pressure9_t *ctx, pressure9_cfg_t *cfg );
void pressure9_default_cfg ( pressure9_t *ctx );
float pressure9_get_pressure_data ( pressure9_t *ctx );
float pressure9_get_temperature_data ( pressure9_t *ctx );
void pressure9_configuration ( pressure9_t *ctx, uint8_t reg_adr, uint8_t data_in );
The demo application displays the pressure and temperature measurement using Pressure 9 click.
The demo application is composed of two sections :
Initialization driver init, test comunication, software reset, configuration module for measurement and calls the function to update calibration coefficients
- this function must be called before the measurement starts.
Reads Temperature data in [C] and Pressure data in [mBar] and this data logs to the USB UART every 2 sec.
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.