TOP Contributors

  1. MIKROE (2655 codes)
  2. Alcides Ramos (353 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 (136781 times)
  2. FAT32 Library (69979 times)
  3. Network Ethernet Library (55948 times)
  4. USB Device Library (46274 times)
  5. Network WiFi Library (41888 times)
  6. FT800 Library (41184 times)
  7. GSM click (28987 times)
  8. PID Library (26419 times)
  9. mikroSDK (26373 times)
  10. microSD click (25381 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

Accel 15 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: Motion

Downloaded: 84 times

Not followed.

License: MIT license  

Accel 15 Click is a compact add-on board that contains a longevity acceleration sensor. This board features the BMA490L, a high-performance 16-bit digital triaxial acceleration sensor with extended availability of up to ten years from Bosch Sensortech. It allows selectable full-scale acceleration measurements in ranges of ±2g, ±4g, ±8g, and ±16g in three axes with a configurable host interface that supports both I2C and SPI serial communication and with intelligent on-chip motion-triggered interrupt features. Intelligent signal processing and evaluation in the accelerometer ASIC enables advanced gesture recognition for numerous industrial IoT applications where low power consumption is vital. This Click board™ is suitable for home appliances, power tools, and other industrial products whose lifetime is essential.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Accel 15 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Accel 15 click" changes.

Do you want to report abuse regarding "Accel 15 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Accel 15 click

Accel 15 Click is a compact add-on board that contains a longevity acceleration sensor. This board features the BMA490L, a high-performance 16-bit digital triaxial acceleration sensor with extended availability of up to ten years from Bosch Sensortech. It allows selectable full-scale acceleration measurements in ranges of ±2g, ±4g, ±8g, and ±16g in three axes with a configurable host interface that supports both I2C and SPI serial communication and with intelligent on-chip motion-triggered interrupt features. Intelligent signal processing and evaluation in the accelerometer ASIC enables advanced gesture recognition for numerous industrial IoT applications where low power consumption is vital. This Click board™ is suitable for home appliances, power tools, and other industrial products whose lifetime is essential.

accel15_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Jan 2021.
  • Type : I2C/SPI type

Software Support

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

Standard key functions :

  • accel15_cfg_setup Config Object Initialization function.

    void accel15_cfg_setup ( accel15_cfg_t *cfg );
  • accel15_init Initialization function.

    err_t accel15_init ( accel15_t *ctx, accel15_cfg_t *cfg );
  • accel15_default_cfg Click Default Configuration function.

    err_t accel15_default_cfg ( accel15_t *ctx );

Example key functions :

  • accel15_get_axis_data Accel 15 get accelerometer axis function.

    err_t accel15_get_axis_data ( accel15_t *ctx, accel15_axis_t *axis );
  • accel15_generic_write Accel 15 data writing function.

    err_t accel15_generic_write ( accel15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
  • accel15_generic_read Accel 15 data reading function.

    err_t accel15_generic_read ( accel15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );

Example Description

This library contains API for Accel 15 Click driver. The library initializes and defines the I2C or SPI bus drivers to write and read data from registers. The library also includes a function for reading X-axis, Y-axis, and Z-axis data.

The demo application is composed of two sections :

Application Init

The initialization of I2C or SPI module, log UART, and additional pins. After the driver init, the app checks communication, sensor ID, and then executes a default configuration.


void application_init ( void ) 
{
    log_cfg_t log_cfg;          /**< Logger config object. */
    accel15_cfg_t accel15_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_printf( &logger, "\r\n-------------------------\r\n" );
    log_printf( &logger, "     Application Init    \r\n" );
    log_printf( &logger, "-------------------------\r\n" );

    // Click initialization.
    accel15_cfg_setup( &accel15_cfg );
    ACCEL15_MAP_MIKROBUS( accel15_cfg, MIKROBUS_1 );
    err_t init_flag  = accel15_init( &accel15, &accel15_cfg );
    if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }

    if ( ACCEL15_ERROR == accel15_check_id( &accel15 ) ) 
    {
        log_printf( &logger, "   Communication ERROR   \r\n" );
        log_printf( &logger, "     Reset the device    \r\n" );
        log_printf( &logger, "-------------------------\r\n" );
        for ( ; ; );
    }

    if ( ACCEL15_ERROR == accel15_default_cfg ( &accel15 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Measures and displays acceleration data for X-axis, Y-axis, and Z-axis. Results are being sent to the USART terminal where the user can track their changes. This task repeats at data output rate which is set to 12.5 Hz.


void application_task ( void ) 
{
    if ( ACCEL15_DRDY == accel15_get_int_1( &accel15 ) ) 
    {
        if ( ACCEL15_OK == accel15_get_axis_data( &accel15, &axis ) )
        {
            log_printf( &logger, "\tX : %d \r\n", axis.x );
            log_printf( &logger, "\tY : %d \r\n", axis.y );
            log_printf( &logger, "\tZ : %d \r\n", axis.z );
            log_printf( &logger, "-------------------------\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.Accel15

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

7x10 Y click

0

7x10 Y click is a LED dot matrix display click, which can be used to display graphics or letters in a very simple and easy way. The click board has two LED dot matrix modules with 7x5 stylish, round, dot-like LED elements. These displays produce clean and uniform patterns since the elements are optically isolated from each other and there is no light bleeding between the adjacent LED cells. Additionally, turn-on and turn-off times of the matrix cells are optimized for a clean and fluid display performance, with no flickering or lag.

[Learn More]

3D Hall 10 click

0

3D Hall 10 Click is a compact add-on board used to detect the strength of a magnetic field in all three dimensions. This board features the TMAG5170, a high-precision linear 3D Hall effect sensor from Texas Instruments. The TMAG5170 features an SPI interface for configuration by MCU. The measurement data is provided in digital format of 12-bits corresponding to the magnetic field measured in each X, Y, and Z axes. It can achieve ultra-high precision at speeds up to 20kSPS for faster and more accurate real-time control and offers multiple diagnostics features to detect and report both system and device-level failures.

[Learn More]

Buck 14 click

0

The Buck 14 Click is a Click board™ based around the BMR4613001/001, a PoL regulator from Flex. It's high-efficiency step-down converter which provides a highly regulated output voltage derived from the connected power source, rated from 4.5 to 14V.

[Learn More]