We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2021-02-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Pressure
Downloaded: 1856 times
Not followed.
License: MIT license
Pressure 14 Click is a compact add-on board that contains a board-mount pressure sensor. This board features the ABP2LANT060PG2A3XX, a piezoresistive silicon pressure sensor offering a digital output for reading pressure over the specified full-scale pressure span and a temperature range from Honeywell Sensing and Productivity Solutions.
Do you want to subscribe in order to receive notifications regarding "Pressure 14 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Pressure 14 click" changes.
Do you want to report abuse regarding "Pressure 14 click".
Library Description
The library covers all the necessary functions to control the Pressure 14 click board. The library performs a standard I2C interface communication.
Key functions:
void pressure14_measure_cmd ( void )
- Output Measurement Command function.void pressure14_read_press_and_temp ( uint8_t *status_byte, uint32_t *pressure_data, uint32_t *temp_data )
- Read pressure and temperature function.float pressure14_get_pressure ( uint32_t pressure_raw, uint8_t conv_unit )
- Calculate pressure function.Examples description
The application is composed of three sections :
void application_task ( ) { pressure14_measure_cmd( ); Delay_ms( 10 ); if ( pressure14_check_busy_flag_int( ) == device_busy_false ) { pressure14_read_press_and_temp( &status, &pressure_tmp, &temperature_tmp ); Delay_ms( 100 ); pressure = pressure14_get_pressure( pressure_tmp, PRESSURE14_CONV_UNIT_MILIBAR ); temperature = pressure14_get_temperature( temperature_tmp, PRESSURE14_CONV_UNIT_CELSIUS ); mikrobus_logWrite( " Pressure : ", _LOG_TEXT ); FloatToStr( pressure, demo_txt ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( " mbar", _LOG_LINE ); mikrobus_logWrite( " Temperature : ", _LOG_TEXT ); FloatToStr( temperature, demo_txt ); mikrobus_logWrite( demo_txt, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); } Delay_ms( 2000 ); }
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.