TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 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 (137038 times)
  2. FAT32 Library (70167 times)
  3. Network Ethernet Library (56040 times)
  4. USB Device Library (46364 times)
  5. Network WiFi Library (41981 times)
  6. FT800 Library (41311 times)
  7. GSM click (29080 times)
  8. mikroSDK (26519 times)
  9. PID Library (26453 times)
  10. microSD click (25449 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

Proximity 13 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.18

mikroSDK Library: 2.0.0.0

Category: Proximity

Downloaded: 111 times

Not followed.

License: MIT license  

Proximity 13 Click based on SI1153-AB09-GMR IC from Silicon Labs that can be used as an proximity, and gesture detector with I2C digital interface and programmable-event interrupt output.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Proximity 13 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Proximity 13 click" changes.

Do you want to report abuse regarding "Proximity 13 click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog

\mainpage Main Page


Proximity 13 click

Proximity 13 Click based on SI1153-AB09-GMR IC from Silicon Labs that can be used as an proximity, and gesture detector with I2C digital interface and programmable-event interrupt output.

proximity13_click.png

click Product page


Click library

  • Author : Luka Filipovic
  • Date : Jan 2020.
  • Type : I2C type

Software Support

We provide a library for the Proximity13 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.

Library Description

This library contains API for Proximity13 Click driver.

Standard key functions :

  • Config Object Initialization function.

    void proximity13_cfg_setup ( proximity13_cfg_t *cfg );

  • Initialization function.

    PROXIMITY13_RETVAL proximity13_init ( proximity13_t ctx, proximity13_cfg_t cfg );

  • Click Default Configuration function.

    void proximity13_default_cfg ( proximity13_t *ctx );

Example key functions :

  • This function writes data to the desired register.

    void proximity13_generic_write ( proximity13_t *ctx, uint8_t reg_adr, uint8_t write_data );

  • This function reads data from the desired register.

    uint8_t proximity13_generic_read ( proximity13_t *ctx, uint8_t reg_adr );

  • This function reads all enabled channels.

    void proximity13_read_channels ( proximity13_t ctx, proximity13_chn_val_t chn_val );

Examples Description

This demo application shows example for measuring close distance.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and additional pin, checks id of device, configurates device for measuring 1. channel, and then sends command to start measuring.


void application_init ( void )
{
    log_cfg_t log_cfg;
    proximity13_cfg_t cfg;
    uint8_t status;

    /** 
     * 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.

    proximity13_cfg_setup( &cfg );
    PROXIMITY13_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    proximity13_init( &proximity13, &cfg );

    status = proximity13_get_int_pin_status( &proximity13 );
    while ( status != PROXIMITY13_PIN_HIGH );

    status = porximity13_check_id( &proximity13 );
    if ( status == PROXIMITY13_OK )
    {
        log_info( &logger, " Device OK" );
    }
    else
    {
        log_info( &logger, " Device Error" );
        for ( ; ; );
    }

    log_info( &logger, " Setting default configuration" );
    proximity13_default_cfg ( &proximity13 );

    proximity13_send_command( &proximity13, PROXIMITY13_CMD_START );
    log_info( &logger, " Starting measurement" );
}

Application Task

Appliction measures values every 100ms and logs result.


void application_task ( void )
{
    proximity13_chn_val_t chn_val;

    proximity13_read_channels( &proximity13, &chn_val );

    log_printf( &logger, " Data : %u\r\n", chn_val.channel_1 );

    Delay_ms ( 100 );
}  

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:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Proximity13

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.


ALSO FROM THIS AUTHOR

Dual EE click

5

Dual EE Click contains two AT24CM02 EEPROM ICs onboard which gives total of 4MB of memory. Each memory IC can be addressed through the I2C interface with the transfer speed of 400KHz.

[Learn More]

Heart rate 4 click

7

Heart rate 4 click carries the MAX30101 high-sensitivity pulse oximeter and heart-rate sensor from Maxim Integrated. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over I2C interface, with additional functionality provided by INT pin on the mikroBUS line.

[Learn More]

TempHum 16 click

0

Temp&Hum 16 Click is a compact add-on board that represents temperature and humidity sensing solutions. This board features the WSEN-HIDS (252.0.0.50001), a MEMS-based capacitive humidity sensor with an integrated ASIC and I2C and SPI serial communication from Würth Elektronik. A silicon-based temperature sensor is also integrated within the same package. ASIC contains the multiplier, operational amplifier, analog-to-digital converter, and other signal conditioning blocks like controller logics and interrupts. It converts the analog signal from humidity and temperature sensing elements into 16-bit digital humidity and temperature values. The 252.0.0.50001 is factory calibrated for both humidity and temperature measurements with no further calibration required. This Click board™ is an ideal solution to be used in various temperature and humidity-related applications.

[Learn More]