TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137078 times)
  2. FAT32 Library (70222 times)
  3. Network Ethernet Library (56094 times)
  4. USB Device Library (46409 times)
  5. Network WiFi Library (42029 times)
  6. FT800 Library (41373 times)
  7. GSM click (29109 times)
  8. mikroSDK (26554 times)
  9. PID Library (26487 times)
  10. microSD click (25483 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

6DOF IMU 14 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: 139 times

Not followed.

License: MIT license  

6DOF IMU 14 Click is a compact add-on board that contains a 6-axis MEMS motion tracking device combining a 3-axis gyroscope and a 3-axis accelerometer. This board features the ICM-42688-P, high precision 6-axis MEMS motion tracking device, from TDK InvenSense.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "6DOF IMU 14 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "6DOF IMU 14 click" changes.

Do you want to report abuse regarding "6DOF IMU 14 click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


6DOF IMU 14 click

6DOF IMU 14 Click is a compact add-on board that contains a 6-axis MEMS motion tracking device combining a 3-axis gyroscope and a 3-axis accelerometer. This board features the ICM-42688-P, high precision 6-axis MEMS motion tracking device, from TDK InvenSense.

6dofimu14_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : May 2021.
  • Type : I2C/SPI type

Software Support

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

Standard key functions :

  • c6dofimu14_cfg_setup Config Object Initialization function.

    void c6dofimu14_cfg_setup ( c6dofimu14_cfg_t *cfg );
  • c6dofimu14_init Initialization function.

    C6DOFIMU14_RETVAL c6dofimu14_init ( c6dofimu14_t *ctx, c6dofimu14_cfg_t *cfg );
  • c6dofimu14_default_cfg Click Default Configuration function.

    void c6dofimu14_default_cfg ( c6dofimu14_t *ctx );

Example key functions :

  • c6dofimu14_get_data This function reads accel and gyro data for all three axis.

    err_t c6dofimu14_get_data ( c6dofimu14_t *ctx, c6dofimu14_axis_t *acc_axis, c6dofimu14_axis_t *gyro_axis );
  • c6dofimu14_get_temperature This function reads the raw temperature data and converts it to Celsius.

    err_t c6dofimu14_get_temperature ( c6dofimu14_t *ctx, float *temp );
  • c6dofimu14_software_reset This function performs the device software reset.

    err_t c6dofimu14_software_reset ( c6dofimu14_t *ctx );

Example Description

This example demonstrates the use of 6DOF IMU 14 click board.

The demo application is composed of two sections :

Application Init

Initializes the driver and configures the click board.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    c6dofimu14_cfg_t c6dofimu14_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 );
    Delay_ms ( 100 );
    log_info( &logger, " Application Init " );

    // Click initialization.

    c6dofimu14_cfg_setup( &c6dofimu14_cfg );
    C6DOFIMU14_MAP_MIKROBUS( c6dofimu14_cfg, MIKROBUS_1 );
    err_t init_flag = c6dofimu14_init( &c6dofimu14, &c6dofimu14_cfg );
    if ( ( init_flag == I2C_MASTER_ERROR ) || ( init_flag == SPI_MASTER_ERROR ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    Delay_ms ( 100 );

    if ( c6dofimu14_default_cfg ( &c6dofimu14 ) != C6DOFIMU14_OK ) 
    {
        log_error( &logger, " Default Config Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    Delay_ms ( 100 );

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

Application Task

Reads accel, gyro, and temperature data and displays the results on the USB UART approximately every 500ms.


void application_task ( void )
{
    float temperature;
    c6dofimu14_axis_t accel;
    c6dofimu14_axis_t gyro;

    c6dofimu14_get_data( &c6dofimu14, &accel, &gyro );
    c6dofimu14_get_temperature( &c6dofimu14, &temperature );

    log_printf( &logger, " Accel X: %d | Gyro X: %d\r\n", accel.x, gyro.x );
    log_printf( &logger, " Accel Y: %d | Gyro Y: %d\r\n", accel.y, gyro.y );
    log_printf( &logger, " Accel Z: %d | Gyro Z: %d\r\n", accel.z, gyro.z );
    log_printf( &logger, " Temperature: %.2f C\r\n", temperature );
    log_printf( &logger, "----------------------------------\r\n");

    Delay_ms ( 500 );
}

Note

In the case of I2C, the example doesn't work properly on some of the 8-bit PICs (ex. PIC18F97J94).

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.6DOFIMU14

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

6DOF IMU 3 click

5

The 6 DOF IMU 3 Click is a Click board equipped with the FXOS8700CQ 6-axis sensor with integrated linear accelerometer and magnetometer.

[Learn More]

Charger 23 click

0

Charger 23 Click is a compact add-on board providing a single-cell battery charging solution. This board features the ISL78693, a single-cell Li-ion or Li-polymer battery charger from Renesas. The ISL78693 can operate with an input voltage as low as 2.6V and works as a linear charger with the battery charged in a Constant Current/Constant Voltage (CC/CV) profile. The charge current is selectable with an external resistor between 250 and 500mA. Additional features include the preconditioning of an over-discharged battery, an NTC thermistor interface for charging the battery in a safe temperature range, automatic recharge, and more.

[Learn More]

SPIRIT 2 click

0

SPIRIT 2 Click features the SP1ML-915, an ultra-low power, fully integrated RF module, which operates at 915 MHz ISM band. This Click board™ can be used to add wireless connectivity to any application, requiring no extensive RF communication experience. The module integrates all the required components, including the 32-bit STM32L1 MCU, a compact chip antenna, and accompanying circuitry. The SP1ML-915 module supports several types of modulation schemes, including 2-FSK, GFSK, GMSK, OOK, and ASK, allowing it to fulfill different RF transmission requirements.

[Learn More]