TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137094 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56121 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42071 times)
  6. FT800 Library (41384 times)
  7. GSM click (29112 times)
  8. mikroSDK (26561 times)
  9. PID Library (26489 times)
  10. microSD click (25486 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Barometer 4 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: Pressure

Downloaded: 79 times

Not followed.

License: MIT license  

Barometer 4 Click is a compact add-on board used to measure air pressure in a specific environment. This board features the ICP-10111, a high accuracy low power barometric and temperature sensor from TDK InvenSense. The ICP-10111 is based on MEMS capacitive technology providing ultra-low noise at the lowest power, enabling industry-leading relative accuracy, sensor throughput, and temperature stability. It comes with a configurable host interface that supports I2C serial communication and measures pressure in a range from 30kPa up to 110kPa with an accuracy of ±1Pa over a wide operating temperature range. This Click board™ is suited for various pressure-based applications, especially when low power consumption is required, home appliances such as airflow control in HVAC, water level detection, vertical velocity monitoring, weather forecasting, and many more.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Barometer 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Barometer 4 click" changes.

Do you want to report abuse regarding "Barometer 4 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Barometer 4 click

Barometer 4 Click is a compact add-on board used to measure air pressure in a specific environment. This board features the ICP-10111, a high accuracy low power barometric and temperature sensor from TDK InvenSense. The ICP-10111 is based on MEMS capacitive technology providing ultra-low noise at the lowest power, enabling industry-leading relative accuracy, sensor throughput, and temperature stability. It comes with a configurable host interface that supports I2C serial communication and measures pressure in a range from 30kPa up to 110kPa with an accuracy of ±1Pa over a wide operating temperature range.

barometer4_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Sep 2021.
  • Type : I2C type

Software Support

We provide a library for the Barometer4 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Barometer4 Click driver.

Standard key functions :

  • barometer4_cfg_setup Config Object Initialization function.

    void barometer4_cfg_setup ( barometer4_cfg_t *cfg );
  • barometer4_init Initialization function.

    err_t barometer4_init ( barometer4_t *ctx, barometer4_cfg_t *cfg );
  • barometer4_default_cfg Click Default Configuration function.

    err_t barometer4_default_cfg ( barometer4_t *ctx );

Example key functions :

  • barometer4_get_pressure_and_temperature Barometer 4 get pressure and temperature function.

    err_t barometer4_get_pressure_and_temperature ( barometer4_t *ctx,  float *pressure, float *temperature );
  • barometer4_get_raw_data Barometer 4 get RAW data function.

    err_t barometer4_get_raw_data ( barometer4_t *ctx, uint16_t measurement_comd, uint32_t *pressure, uint16_t *temperature );
  • barometer4_soft_reset Barometer 4 software reset function.

    err_t barometer4_soft_reset ( barometer4_t *ctx );

Example Description

This library contains API for the Barometer 4 Click driver. The library initializes and defines the I2C bus drivers to write and read data from registers. This demo application shows an example of atmospheric pressure and temperature measurement.

The demo application is composed of two sections :

Application Init

The initialization of the I2C module and log UART. After driver initialization and default settings, the app display device ID.


void application_init ( void ) 
{
    log_cfg_t log_cfg;                /**< Logger config object. */
    barometer4_cfg_t barometer4_cfg;  /**< Click config object. */

    /** 
     * 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 @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    barometer4_cfg_setup( &barometer4_cfg );
    BAROMETER4_MAP_MIKROBUS( barometer4_cfg, MIKROBUS_1 );
    err_t init_flag = barometer4_init( &barometer4, &barometer4_cfg );
    if ( I2C_MASTER_ERROR == init_flag ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    barometer4_default_cfg ( &barometer4 );
    log_info( &logger, " Application Task " );
    log_printf( &logger, "----------------------------\r\n" );
    Delay_ms ( 100 );

    static uint16_t device_id;
    err_t err_flag = barometer4_get_device_id( &barometer4, &device_id );
    if ( BAROMETER4_ERROR == err_flag ) 
    {
        log_error( &logger, " Communication Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    log_printf( &logger, " Device ID   : 0x%.4X \r\n", device_id );
    log_printf( &logger, "----------------------------\r\n" );
    Delay_ms ( 1000 );
}

Application Task

This is an example that shows the use of a Barometer 4 Click board™. Logs the atmospheric pressure [ Pa ] and temperature [ degree Celsius ] data. Results are being sent to the Usart Terminal where you can track their changes.


void application_task ( void ) 
{  
    static float pressure;
    static float temperature;

    barometer4_get_pressure_and_temperature( &barometer4, &pressure, &temperature );
    log_printf( &logger, " Pressure    : %.2f Pa\r\n", pressure );
    log_printf( &logger, " Temperature : %.2f C\r\n", temperature );
    log_printf( &logger, "----------------------------\r\n" );
    Delay_ms ( 1000 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Barometer4

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Color 9 click

5

Color 9 Click is a very accurate color sensing Click board which features the APDS-9250, IR and ambient light sensor, from Broadcom. It contains a specially designed matrix of photosensitive elements, which can sense red, green, blue and IR component.

[Learn More]

SPI Isolator 4 click

0

SPI Isolator 4 Click is a compact add-on board that contains a digital isolator optimized for a serial peripheral interface. This board features the ADuM341E, a quad-channel 5kVRMS digital isolator from Analog Devices. This board features the ADuM341E, a quad-channel 5kVRMS digital isolator from Analog Devices. This isolation component provides outstanding performance by combining high speed, complementary metal-oxide-semiconductor (CMOS), and monolithic air core transformer technology. Its data channels are independent and available in various configurations with a withstand voltage rating of 5kVrms, and operate with the external supply voltage ranging from 2.25V to 5.5V, providing compatibility with lower voltage systems enabling voltage translation functionality across the isolation barrier.

[Learn More]

LightRanger 11 click

0

LightRanger 11 Click is a compact add-on board suitable for range-finding and distance-sensing applications. This board features the VL53L7CX, a time-of-flight 8x8 multizone ranging sensor from STMicroelectronics. It is a fast and accurate multizone distance-ranging sensor width of 90° wide FoV. The multizone-ranging output with either 4x4 or 8x8 separate zones, width multitarget detection, and distance measurement in each zone. As a multizone-ranging device, its range is only up to 350cm.

[Learn More]