TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136977 times)
  2. FAT32 Library (70091 times)
  3. Network Ethernet Library (56023 times)
  4. USB Device Library (46343 times)
  5. Network WiFi Library (41961 times)
  6. FT800 Library (41274 times)
  7. GSM click (29051 times)
  8. mikroSDK (26488 times)
  9. PID Library (26447 times)
  10. microSD click (25411 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

LightRanger 11 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: Optical

Downloaded: 29 times

Not followed.

License: MIT license  

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.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LightRanger 11 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LightRanger 11 click" changes.

Do you want to report abuse regarding "LightRanger 11 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


LightRanger 11 click

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.

lightranger11_click.png

click Product page


Click library

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

Software Support

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

Standard key functions :

  • lightranger11_cfg_setup Config Object Initialization function.

    void lightranger11_cfg_setup ( lightranger11_cfg_t *cfg );
  • lightranger11_init Initialization function.

    err_t lightranger11_init ( lightranger11_t *ctx, lightranger11_cfg_t *cfg );
  • lightranger11_default_cfg Click Default Configuration function.

    err_t lightranger11_default_cfg ( lightranger11_t *ctx );

Example key functions :

  • lightranger11_get_ranging_data LightRanger 11 get ranging data function.

    err_t lightranger11_get_ranging_data ( lightranger11_t *ctx, lightranger11_results_data_t *results );
  • lightranger11_get_resolution LightRanger 11 get resolution function.

    err_t lightranger11_get_resolution ( lightranger11_t *ctx, uint8_t *resolution );
  • lightranger11_get_int_pin LightRanger 11 get int pin function.

    uint8_t lightranger11_get_int_pin ( lightranger11_t *ctx );

Example Description

This example demonstrates the use of LightRanger 11 click board by reading and displaying 8x8 zones measurements 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. */
    lightranger11_cfg_t lightranger11_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.
    lightranger11_cfg_setup( &lightranger11_cfg );
    LIGHTRANGER11_MAP_MIKROBUS( lightranger11_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == lightranger11_init( &lightranger11, &lightranger11_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( LIGHTRANGER11_ERROR == lightranger11_default_cfg ( &lightranger11 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Reads all zone measurements approximately every 500ms and logs them to the USB UART as an 8x8 map. The silicon temperature measurement in degrees Celsius is also displayed.

void application_task ( void ) 
{
    if ( !lightranger11_get_int_pin ( &lightranger11 ) )
    {
        lightranger11_results_data_t results;
        uint8_t resolution, map_side;
        err_t error_flag = lightranger11_get_resolution ( &lightranger11, &resolution );
        error_flag |= lightranger11_get_ranging_data ( &lightranger11, &results );
        if ( LIGHTRANGER11_OK == error_flag )
        {
            map_side = ( LIGHTRANGER11_RESOLUTION_4X4 == resolution ) ? 4 : 8;
            log_printf ( &logger, "\r\n %ux%u MAP (mm):\r\n", ( uint16_t ) map_side, ( uint16_t ) map_side );
            for ( uint16_t cnt = 1; cnt <= resolution; cnt++ )
            {
                log_printf ( &logger, " %u\t", results.distance_mm[ cnt - 1 ] );
                if ( 0 == ( cnt % map_side ) )
                {
                    log_printf ( &logger, "\r\n" );
                }
            }
            log_printf ( &logger, " Silicon temperature : %d degC\r\n", ( int16_t ) results.silicon_temp_degc );
        }
    }
}

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

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

SolidSwitch 3 click

0

SolidSwitch 3 Click is a compact add-on board that contains a load switching device. This board features the BD8LB600FS-C, an automotive eight-channel low-side switch from Rohm Semiconductor. Every switch is controlled via an SPI interface and includes an N-channel MOSFET that supports a maximum current of 1A. The BD8LB600FS-C also has built-in protection circuits, namely the overcurrent, the thermal shutdown, the open-load detection, and the voltage lock-out circuits. Moreover, this device also possesses a diagnostic output function during abnormal detection.

[Learn More]

10x10 RGB click

5

10x10 RGB Click is a matrix of 100 &quot;intelligent&quot; RGB elements, forming a 10x10 display screen. These LED elements feature internal logic, which allows them to communicate directly with the MCU.

[Learn More]

BLE 9 click

0

BLE 9 Click is a fully embedded stand-alone Bluetooth 5.2 Energy connectivity module, equipped with the EFR32BG22 Series 2 Modules, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M33 CPU microprocessor with FPU, and state-of-the-art power performance. Reliable and easy to use, BLE 9 click is a perfect solution for development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.

[Learn More]