TOP Contributors

  1. MIKROE (2656 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 (136880 times)
  2. FAT32 Library (70003 times)
  3. Network Ethernet Library (55999 times)
  4. USB Device Library (46305 times)
  5. Network WiFi Library (41929 times)
  6. FT800 Library (41208 times)
  7. GSM click (29013 times)
  8. PID Library (26423 times)
  9. mikroSDK (26398 times)
  10. microSD click (25386 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 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-03-20

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Motion

Downloaded: 3715 times

Not followed.

License: MIT license  

6DOF IMU 4 Click is an advanced 6-axis motion tracking Click board, which utilizes the ICM-20602, a high-performance integrated motion sensor, equipped with a 3-axis gyroscope, and a 3-axis accelerometer.

No Abuse Reported

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

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

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

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

6DOF IMU 4 click

6DOF IMU 4 click

Native view of the 6DOF IMU 4 click board.

View full image
6DOF IMU 4 click

6DOF IMU 4 click

Front and back view of the 6DOF IMU 4 click board.

View full image

Library Description

The library performs a gyroscope, accelerometer and temperature measurements and control of the 6DOF IMU 4 Click board. User also can select a desired full scale range, offset and threshold for the desired measurement. The control of the 6DOF IMU 4 Click board can be performed by using I2C or SPI interface. For more details check documentation.

Key functions:

  • T_C6DOFIMU4_RETVAL c6dofimu4_writeByte( uint8_t regAddr, uint8_t dataIn ) - Function writes one byte data to the desired register.
  • T_C6DOFIMU4_RETVAL c6dofimu4_readBytes( uint8_t startAddr, uint8_t *dataOut, uint8_t nBytes ) - Function performs a sequential data reading starting from the desired address.
  • void c6dofimu4_getData( T_c6dofimu4_axis *accelOut, T_c6dofimu4_axis *gyroOut, int8_t *tempOut ) - Function performs a data reading and all necessary calculations to get accelerometer, gyroscope and temperature data.
  • T_C6DOFIMU4_RETVAL c6dofimu4_setFSR( uint8_t gyro_resol, uint8_t accel_resol ) - Function selects a measurement full scale range.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes I2C or SPI interface and performs a device reset and configurations.
  • Application Task - (code snippet) - Waits until data is ready and then reads the all data registers, accelerometer, gyroscope and temperature data, and shows results to the uart terminal every 500ms.
void applicationTask()
{
    dataReady = c6dofimu4_getStatus( _C6DOFIMU4_DATA_RDY_INT_MASK );
    while (dataReady != _C6DOFIMU4_DATA_RDY_INT_OCCURED)
    {
        dataReady = c6dofimu4_getStatus( _C6DOFIMU4_DATA_RDY_INT_MASK );
    }
    
    c6dofimu4_getData( &accel_data, &gyro_data, &temperature );
    
    mikrobus_logWrite( "** Accelerometer values :", _LOG_LINE );
    logAxis( &accel_data, &accelUnit[0] );
    mikrobus_logWrite( "", _LOG_LINE );
    
    mikrobus_logWrite( "** Gyroscope values :", _LOG_LINE );
    logAxis( &gyro_data, &gyroUnit[0] );
    mikrobus_logWrite( "", _LOG_LINE );
    
    mikrobus_logWrite( "** Temperature value : ", _LOG_TEXT );
    ShortToStr( temperature, text );
    mikrobus_logWrite( text, _LOG_TEXT );
    mikrobus_logWrite( tempUnit, _LOG_LINE );
    mikrobus_logWrite( "-------------------------------------------------", _LOG_LINE );
    mikrobus_logWrite( "", _LOG_LINE );
    
    Delay_ms( 500 );
}

Additional Functions :

  • floatCut - Makes to float values be rounded on two decimal places.
  • logAxis - Logs axis values for the desired measured data on the uart terminal.

Other mikroE Libraries used in the example:

  • I2C
  • SPI
  • UART

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

6DOF IMU 21 click

0

6DOF IMU 21 Click is a compact add-on board perfect for applications requiring accurate orientation and movement detection. This board features the WSEN-ISDS (2536030320001) sensor from Würth Elektronik, which integrates 3-axis acceleration and gyroscope sensors using advanced MEMS-based capacitive sensing technology. It offers a fully calibrated 16-bit digital output, with acceleration ranges from ±2g to ±16g and gyroscope ranges from ±125dps to ±2000dps, alongside a high output data rate of up to 6.6kHz for seamless movement tracking. Additionally, an embedded temperature sensor provides environmental monitoring capabilities.

[Learn More]

NB IoT 4 click

0

NB IoT 4 Click is a compact add-on board that contains a cellular IoT-based module with integrated eSIM for global data connectivity. This board features the C1-RM, a three-band NB-IoT, IoT/2G wireless communication module supporting Band 3, 5, and 8 mainly applied to low power data transmission service from Cavli Wireless.

[Learn More]

NeoMesh 915MHz click

0

NeoMesh Click - 915MHz is a compact add-on board with a low-power, long-range transceiver, ideal for Mesh wireless networking. This board features the NC1000C-9, a wireless Mesh network module from NeoCortec. With an additional antenna that MikroE offers connected to the module’s u.Fl connector, you can create a fully functional wireless Mesh network node that will work in the Sub-GHz frequency band of 915MHz. The module has a generic application layer that can configured to suit applications.

[Learn More]