press 2.1.0.0
Main Page

PRESS click

‍PRESS Click is a compact add-on board that contains a board-mount pressure sensor. This board features the ILPS28QSW, an absolute digital output barometer from STMicroelectronics. It is a dual full-scale sensor with a measuring range of 260 up to 4060hPa. In addition, it comes with a Qvar detection ability, which is an electric charge variation detection and is available on two pins.

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Aug 2023.
  • Type : I2C type

Software Support

We provide a library for the PRESS 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 PRESS Click driver.

Standard key functions :

Example key functions :

Example Description

‍This example demonstrates the use of PRESS Click boardâ„¢ by reading and displaying the pressure, temperature and Qvar measurements.

The demo application is composed of two sections :

Application Init

‍The initialization of I2C module and log UART. After driver initialization, the app sets the default configuration.

void application_init ( void )
{
log_cfg_t log_cfg;
press_cfg_t press_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
press_cfg_setup( &press_cfg );
PRESS_MAP_MIKROBUS( press_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == press_init( &press, &press_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( PRESS_ERROR == press_default_cfg ( &press ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
#if ( EXAMPLE_MODE == EXAMPLE_MODE_PRESS_TEMP )
log_printf( &logger, " Pressure and Temperature\r\n" );
#elif ( EXAMPLE_MODE == EXAMPLE_MODE_SWIPE_SENSING )
{
log_printf( &logger, " Swipe sensing\r\n" );
}
else
{
log_error( &logger, " Qvar configuration.\r\n" );
for ( ; ; );
}
#endif
log_printf( &logger, " ______________________ \r\n" );
Delay_ms ( 1000 );
}
#define PRESS_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition press.h:230
#define PRESS_AH_QVAR_ENABLE
Definition press.h:196
err_t press_config_ah_qvar(press_t *ctx, uint8_t ah_qvar_en)
PRESS config AH and Qva function.
void application_init(void)
Definition main.c:61
@ PRESS_ERROR
Definition press.h:273
@ PRESS_OK
Definition press.h:272

Application Task

‍The demo application shows the module working depending on the example mode:

  • EXAMPLE_MODE_PRESS_TEMP: Reads and displays the Pressure [mBar] and Temperature [degree Celsius] data.
  • EXAMPLE_MODE_SWIPE_SENSING: Detect a touch or a swipe. Results are being sent to the UART Terminal, where you can track their changes.
void application_task ( void )
{
#if ( EXAMPLE_MODE == EXAMPLE_MODE_PRESS_TEMP )
#elif ( EXAMPLE_MODE == EXAMPLE_MODE_SWIPE_SENSING )
#endif
}
void application_task(void)
Definition main.c:112
void example_pressure_temperature(void)
PRESS example pressure and temperature function.
Definition main.c:138
void example_swipe_sensing(void)
PRESS example swipe sensing function.
Definition main.c:149

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.PRESS

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.