TOP Contributors

  1. MIKROE (2750 codes)
  2. Alcides Ramos (372 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 (139022 times)
  2. FAT32 Library (71563 times)
  3. Network Ethernet Library (56975 times)
  4. USB Device Library (47295 times)
  5. Network WiFi Library (43003 times)
  6. FT800 Library (42291 times)
  7. GSM click (29727 times)
  8. mikroSDK (27853 times)
  9. PID Library (26846 times)
  10. microSD click (26093 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

9DOF 3 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: Motion

Downloaded: 132 times

Not followed.

License: MIT license  

9DOF 3 Click introduces the BMX055, a small-scale absolute orientation sensor in the class of low-noise 9-axis measurement units, from Bosch Sensortec. It comprises the full functionality of a triaxial, low-g acceleration sensor, a triaxial angular rate sensor and a triaxial geomagnetic sensor. All three sensor components of the BMX055 can be operated and addressed independently from each other. On top, the BMX055 integrates a multitude of features that facilitate its use especially in the area of motion detection applications, such as device orientation measurement, gaming, HMI or menu browser control. 9DOF 3 Click offers both SPI and I2C digital interfaces for easy and fast system integration.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "9DOF 3 Click" changes.

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

Do you want to report abuse regarding "9DOF 3 Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


9DOF 3 Click

9DOF 3 Click introduces the BMX055, a small-scale absolute orientation sensor in the class of low-noise 9-axis measurement units, from Bosch Sensortec. It comprises the full functionality of a triaxial, low-g acceleration sensor, a triaxial angular rate sensor and a triaxial geomagnetic sensor. All three sensor components of the BMX055 can be operated and addressed independently from each other. On top, the BMX055 integrates a multitude of features that facilitate its use especially in the area of motion detection applications, such as device orientation measurement, gaming, HMI or menu browser control. 9DOF 3 Click offers both SPI and I2C digital interfaces for easy and fast system integration.

9dof3_click.png

Click Product page


Click library

  • Author : MikroE Team
  • Date : jun 2020.
  • Type : I2C/SPI type

Software Support

We provide a library for the 9Dof3 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for 9Dof3 Click driver.

Standard key functions :

  • Config Object Initialization function.

    void c9dof3_cfg_setup ( c9dof3_cfg_t *cfg );

  • Initialization function.

    C9DOF3_RETVAL c9dof3_init ( c9dof3_t ctx, c9dof3_cfg_t cfg );

  • Click Default Configuration function.

    void c9dof3_default_cfg ( c9dof3_t *ctx );

Example key functions :

  • The function check device ID for accelerometer, gyroscope and magnetometer.

    uint8_t c9dof3_check_communication ( c9dof3_t *ctx );

  • Function read Accel, Gyro and Mag X-axis, Y-axis data and Z-axis data.

    void c9dof3_get_data ( c9dof3_t ctx, c9dof3_accel_t accel_data, c9dof3_gyro_t gyro_data, c9dof3_mag_t mag_data );

  • This function reads data from the desired register.

    void c9dof3_generic_read ( c9dof3_t ctx, uint8_t reg, uint8_t data_buf, uint8_t len );

Examples Description

This Click introduces a small-scale absolute orientation sensor in the class of low-noise 9-axis measurement units. It comprises the full functionality of a triaxial, low-g acceleration sensor, a triaxial angular rate sensor and a triaxial geomagnetic sensor. All three sensor components can be operated and addressed independently from each other. 9DOF 3 Click offers both SPI and I2C digital interfaces

The demo application is composed of two sections :

Application Init

Initialization driver enables - I2C or SPI, check communication, set default configuration for accelerometer, gyroscope and magnetometer, also write log.


void application_init ( void )
{
    log_cfg_t log_cfg;
    c9dof3_cfg_t cfg;

    /** 
     * 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.

    c9dof3_cfg_setup( &cfg );
    C9DOF3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    c9dof3_init( &c9dof3, &cfg );
    Delay_ms ( 100 );

    if ( c9dof3_check_communication( &c9dof3 ) == ( C9DOF3_ACC_COMM_SUCCESS  |
                                                    C9DOF3_GYRO_COMM_SUCCESS |
                                                    C9DOF3_MAG_COMM_SUCCESS ) )
    {
        log_printf( &logger, "    Communication OK     \r\n" );
    }
    else
    {
        log_printf( &logger, "   Communication ERROR   \r\n" );
        log_printf( &logger, "     Reset the device    \r\n" );
        log_printf( &logger, "-------------------------\r\n" );
        for ( ; ; );
    }

    log_printf( &logger, "-------------------------\r\n" );
    c9dof3_default_cfg( &c9dof3 );
    Delay_ms ( 100 );
}

Application Task

This is an example which demonstrates the use of 9DOF 3 Click board. Measures and displays Accel, Gyroscope and Magnetometer values for X-axis, Y-axis and Z-axis. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.


void application_task ( void )
{
    c9dof3_get_data ( &c9dof3, &accel_data, &gyro_data, &mag_data );

    log_printf( &logger, " Accel X: %d | Gyro X: %d |  Mag X: %d\r\n", accel_data.x, gyro_data.x, mag_data.x );
    log_printf( &logger, " Accel Y: %d | Gyro Y: %d |  Mag Y: %d\r\n", accel_data.y, gyro_data.y, mag_data.y );
    log_printf( &logger, " Accel Z: %d | Gyro Z: %d |  Mag Z: %d\r\n", accel_data.z, gyro_data.z, mag_data.z );

    log_printf( &logger, "------------------------------------------\r\n" );

    Delay_ms ( 1000 );
} 

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.9Dof3

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

ISO ADC 3 Click

0

ISO ADC 3 Click is a compact add-on board that contains a single-channel precision isolation amplifier. This board features the AMC1100, a precision isolation amplifier with an output separated from the input circuitry by a silicon dioxide barrier that is highly resistant to magnetic interference from Texas Instruments.

[Learn More]

Charger 25 Click

0

Charger 25 Click is a compact add-on board that contains a battery charger. This board features the BQ25792, a buck-boost battery charger with a dual-input selector, and a USB PD3.0 OTG output from Texas Instruments. It is fully integrated for 1-4 cell Li-Ion and Li-Polymer batteries. Designed specifically for USB applications, it also includes a Narrow voltage DC (NVDC) power path management in which the system is regulated at a voltage slightly higher than the battery voltage without being allowed to drop below the minimum system voltage.

[Learn More]

MCP2003B Click

0

MCP2003B Click is a compact add-on board with a physical interface to automotive and industrial LIN systems compliant with the LIN Bus Specification Revision 2.2, SAE J2602, and ISO 17987. This board features the MCP2003B, a LIN transceiver from Microchip. The LIN, which stands for a Local Interconnect Network, is used in conjunction with the CAN interface for communication between the components inside of vehicles. The MCP2003B is a bi-directional half-duplex LIN transceiver that supports baud rates up to 20Kbaud with a LIN-compatible output driver. According to the standard on which this LIN transceiver works, connecting up to 15 peripheral devices to a single controller device is possible.

[Learn More]