TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 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 (136611 times)
  2. FAT32 Library (69810 times)
  3. Network Ethernet Library (55881 times)
  4. USB Device Library (46214 times)
  5. Network WiFi Library (41858 times)
  6. FT800 Library (41070 times)
  7. GSM click (28942 times)
  8. PID Library (26401 times)
  9. mikroSDK (26310 times)
  10. microSD click (25326 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

XSENS MTI-3 click

Rating:

5

Author: MIKROE

Last Updated: 2020-10-19

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Motion

Downloaded: 332 times

Not followed.

License: MIT license  

XSENS MTi-3 Click is a compact add-on board that contains a fully functional module that can be configured as an Inertial Measurement Unit, Vertical reference Unit, or even an Attitude &amp; Heading Reference System.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "XSENS MTI-3 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "XSENS MTI-3 click" changes.

Do you want to report abuse regarding "XSENS MTI-3 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)

mikroSDK Library Blog

XSENS MTi-3 Click

XSENS MTi-3 Click

Native view of the XSENS MTi-3 Click board.

View full image
XSENS MTi-3 Click

XSENS MTi-3 Click

Front and back view of the XSENS MTi-3 Click board.

View full image

Library Description

The library contains basic functions for working with click. Of the communications, only UART is supported.

Key functions:

  • void xsensmti3_parser(uint8_t *rsp_buf, uint8_t start_cnt xsensmti3_parse_t *obj ) - General Parser
  • void xsensmti3_get_data(xsensmti3_quat_t *quat_obj,xsensmti3_data_t *data_obj) - Get Roll, Pitch and Yaw
  • uint8_t xsensmti3_check_package(uint8_t *package_buf,uint8_t *start_package) - Checks package

Examples description

The application is composed of three sections :

  • System Initialization - Initialize UART module and necessary GPIO pins
  • Application Initialization - Initialize driver init and uart interrupt
  • Application Task - Reads and parsing data packaga. Shows Roll, Pitch and Yaw data.
void application_task ( )
{
    uint8_t check_data = 0;
    uint8_t cnt = 0;

    // STARTS COLLECTING DATA
    if ( active_flag == XSENSMTI3_WAIT_FOR_START )
    {
        memset( &parser_current_buf[0], 0 , 110 );
        parser_buf_cnt = 0;
        active_flag = XSENSMTI3_START_PROCESS;
        xsensmti3_enable_uart_isr( );
    }

    // CHECKS RECEIVED DATA
    if ( ( parser_buf_cnt > 100 ) && ( active_flag == XSENSMTI3_START_PROCESS ) )
    {
       xsensmti3_disable_uart_isr( );
       active_flag = XSENSMTI3_DATA_PROCESSING;
    }

    // CHECKS IF THE VALID PACKAGE IS RECEIVED
    if ( active_flag == XSENSMTI3_DATA_PROCESSING )
    {
        check_data = xsensmti3_check_package( &parser_current_buf[0], &start_rsp );
        if ( check_data == 1 )
        {
            active_flag = XSENSMTI3_PARSER_DATA;
        }
        else
        {
            active_flag = XSENSMTI3_WAIT_FOR_START;
        }
    }

    // PARSING DATA AND DISPLAY
    if ( active_flag == XSENSMTI3_PARSER_DATA )
    {
       xsensmti3_parser( &parser_current_buf[0], start_rsp, &parse_data_obj );

       mikrobus_logWrite( ">> Quaternion data <<", _LOG_LINE );

       for ( cnt = 0; cnt < 4; cnt++ )
       {
           mikrobus_logWrite( ">> Q: ", _LOG_TEXT );
           FloatToStr( parse_data_obj.quat_obj.quat_data[ cnt ], demo_text );
           LTrim( demo_text );
           mikrobus_logWrite( demo_text , _LOG_LINE );
       }

       mikrobus_logWrite( "--------------", _LOG_LINE );

       xsensmti3_get_data( &parse_data_obj.quat_obj, &data_obj );

       mikrobus_logWrite( ">> ROLL: ", _LOG_TEXT );
       FloatToStr( data_obj.roll, demo_text );
       LTrim( demo_text );
       mikrobus_logWrite( demo_text , _LOG_LINE );

       mikrobus_logWrite( ">> PITCH: ", _LOG_TEXT );
       FloatToStr( data_obj.pitch, demo_text );
       LTrim( demo_text );
       mikrobus_logWrite( demo_text , _LOG_LINE );

       mikrobus_logWrite( ">> YAW: ", _LOG_TEXT );
       FloatToStr( data_obj.yaw, demo_text );
       LTrim( demo_text );
       mikrobus_logWrite( demo_text , _LOG_LINE );

       Delay_ms( 1000 );
       active_flag = XSENSMTI3_WAIT_FOR_START;

       mikrobus_logWrite( " rn--------------", _LOG_LINE );
    }
}

Other mikroE Libraries used in the example:

  • UART Library

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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

H-Bridge 4 click

5

H-Bridge 4 Click is a Click board that contains the AP1010AEN, which is a two channel H-Bridge motor driver compatible with a motor operating voltage up to 18V and can drive two DC motors or one stepper motor.

[Learn More]

Magic RFID click

0

Magic RFID Click is a compact add-on board that contains an embedded RFID module. This board features the M6E-NANO, UHF RFID module with ultra-low power consumption from JADAK. Supporting the EPC Gen2V2 and ISO 18000-63 standard, the M6E-NANO module is available for global use. It operates in the Ultra High Frequency (UHF) band in a range from 859 up to 930MHz and can be used for write/read applications.

[Learn More]

Stepper 2 click

7

Stepper 2 click carries a A4988 microstepping motor driver along with screw terminals for connecting an external motor, as well as for bringing in an external power supply. The output drive capacity of the motor is up to 35V and ±2A.

[Learn More]