TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139252 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57122 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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

IR Gesture 3 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.10

mikroSDK Library: 2.0.0.0

Category: Motion

Downloaded: 96 times

Not followed.

License: MIT license  

IR Gesture 3 Click is a compact add-on board that provides contactless gesture recognition. This board features the ADPD1080, a photometric front-end from Analog Devices. The IR Gesture 3 Click allows gesture recognition in two dimensions, with a built-in optical filter and a sharp visible light cutoff. It eliminates the need for external lenses and preserves the dynamic range of the sensor when placed under sunlight or indoor lighting. It does not require a precise alignment because its sensor maintains a linear response within the ±35° angular field of view.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "IR Gesture 3 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "IR Gesture 3 Click" changes.

Do you want to report abuse regarding "IR Gesture 3 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


IR Gesture 3 Click

IR Gesture 3 Click is a compact add-on board that provides contactless gesture recognition. This board features the ADPD1080, a photometric front-end from Analog Devices. The IR Gesture 3 Click allows gesture recognition in two dimensions, with a built-in optical filter and a sharp visible light cutoff. It eliminates the need for external lenses and preserves the dynamic range of the sensor when placed under sunlight or indoor lighting. It does not require a precise alignment because its sensor maintains a linear response within the ±35° angular field of view.

irgesture3_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Mar 2023.
  • Type : I2C type

Software Support

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

Standard key functions :

  • irgesture3_cfg_setup Config Object Initialization function.

    void irgesture3_cfg_setup ( irgesture3_cfg_t *cfg );
  • irgesture3_init Initialization function.

    err_t irgesture3_init ( irgesture3_t *ctx, irgesture3_cfg_t *cfg );
  • irgesture3_default_cfg Click Default Configuration function.

    err_t irgesture3_default_cfg ( irgesture3_t *ctx );

Example key functions :

  • irgesture3_set_mode This function sets the device operating mode.

    err_t irgesture3_set_mode ( irgesture3_t *ctx, uint8_t mode );
  • irgesture3_set_adc_fsample This function sets the sample frequency of the device.

    err_t irgesture3_set_adc_fsample ( irgesture3_t *ctx, uint16_t freq_hz );
  • irgesture3_get_gesture This function waits up to IRGESTURE3_MAX_NUM_SAMPLES for an object to be detected and then calculates its gesture.

    err_t irgesture3_get_gesture ( irgesture3_t *ctx, uint8_t *gesture );

Example Description

This example demonstrates the use of IR Gesture 3 Click board by processing the incoming gestures and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    irgesture3_cfg_t irgesture3_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.
    irgesture3_cfg_setup( &irgesture3_cfg );
    IRGESTURE3_MAP_MIKROBUS( irgesture3_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == irgesture3_init( &irgesture3, &irgesture3_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( IRGESTURE3_ERROR == irgesture3_default_cfg ( &irgesture3 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Reads and processes all the incoming gestures and displays them on the USB UART.

void application_task ( void )
{
    uint8_t gesture = 0;
    if ( IRGESTURE3_OK == irgesture3_get_gesture ( &irgesture3, &gesture ) )
    {
        log_printf( &logger, "\r\n Gesture: " );
        switch ( gesture )
        {
            case IRGESTURE3_GESTURE_CLICK:
            {
                log_printf( &logger, "CLICK\r\n" );
                break;
            }
            case IRGESTURE3_GESTURE_SWIPE_UP:
            {
                log_printf( &logger, "SWIPE UP\r\n" );
                break;
            }
            case IRGESTURE3_GESTURE_SWIPE_DOWN:
            {
                log_printf( &logger, "SWIPE DOWN\r\n" );
                break;
            }
            case IRGESTURE3_GESTURE_SWIPE_LEFT:
            {
                log_printf( &logger, "SWIPE LEFT\r\n" );
                break;
            }
            case IRGESTURE3_GESTURE_SWIPE_RIGHT:
            {
                log_printf( &logger, "SWIPE RIGHT\r\n" );
                break;
            }
            default:
            {
                log_printf( &logger, "UNKNOWN\r\n" );
                break;
            }
        }
    }
    else
    {
        log_printf( &logger, "\r\n No gesture detected!\r\n" );
    }
}

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

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

Mikromedia 5 for Kinetis Capacitive FPI

0

This project contains example for testing modules on Mikromedia 5 for Kinetis Capacitive FPI.

[Learn More]

ADC 2 click

5

ADC 2 click carries MCP3551/3, which is a 22-bit ADC with automatic internal offset and gain calibration. This high precision analog-to-digital converter has total unadjusted error of less than 10 ppm, and low-output noise of 2.5 µV RMS. ADC 2 click communicates with the target board through mikroBUS CS, CSK and MISO lines.

[Learn More]

Proximity 13 click

5

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. The host can send command the Proximity 13 click to initiate on-demand proximity measurements.

[Learn More]