altitude2 2.0.0.0
|
Altitude 2 click is a high-resolution barometric pressure sensor Click boardâ„¢. It provides very accurate measurements of temperature and atmospheric pressure, which can be used to calculate the altitude with a very high resolution of 20cm per step. Besides that, the device also includes features such as the ultra-low noise delta-sigma 24bit ADC, low power consumption, fast conversion times, pre-programmed unique compensation values, and more.
We provide a library for the Altitude2 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 Altitude2 Click driver.
altitude2_cfg_setup
Config Object Initialization function. altitude2_init
Initialization function. altitude2_read_prom
This function reads calibration data from PROM. altitude2_reset
This function resets the device and reads calibration coefficients after reset. altitude2_read_data
Data read function. This example demonstrates the use of Altitude 2 Click to measure temperature, altitude and pressure.
The demo application is composed of two sections :
Initializes I2C driver and performs the device reset, after which the calibration coefficients be read. Determines the ratio value for temperature and pressure measurements. Calibration coefficients are necessary to read after the device reset.
Gets temperature data in celsius value and pressure data in mbar value. Gets the calculated altitude value in meters which depends on the temperature and pressure measurements. Logs results on USBUART and repeats operation each second.
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.