6DOF IMU 9 Click Board
6DOF IMU 9 Click Board
The 6DOF IMU 9 Click Board™ features the IAM-20680, a 6-axis motion tracking device that combines a 3-axis gyroscope and a 3-axis accelerometer, from TDK InvenSense. A combination of the two most commonly used motion sensors allows for full 6D sensing. Tailored towards the Industry 4.0.
This Click Board™ can be used for automotive applications and navigation systems aids for dead reckoning, liftgate motion detection, accurate location for vehicle to vehicle and infrastructure, 360º view camera stabilization, car alarm, telematics and insurance vehicle tracking.
Software Support
We provide a library for the 6DOF IMU 9 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control 6DOF IMU 9 Click Board™. Library performs a standard I2C or SPI interface communication.
Key Functions
void c6dofimu9_get_accel_data( int16_t *p_accel_x, int16_t *p_accel_y, int16_t *p_accel_z )
- Read Accel X-axis, Y-axis and Z-axis axis function.void c6dofimu9_get_gyro_data( int16_t *p_gyro_x, int16_t *p_gyro_y, int16_t *p_gyro_z )
- Read Gyro X-axis, Y-axis and Z-axis axis function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C or SPI and start to write log.
- Application Initialization - Initialization driver enables - I2C or SPI, check device ID, configure accelerometer and gyroscope, also write log.
- Application Task - (code snippet) This is an example which demonstrates the use of 6DOF IMU 9 Click Board™. Measured and display Accel and Gyro data coordinates 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( ) { c6dofimu9_get_accel_data( &accel_axis_x, &accel_axis_y, &accel_axis_z ); Delay_10ms( ); c6dofimu9_get_gyro_data( &gyro_axis_x, &gyro_axis_y, &gyro_axis_z ); Delay_10ms( ); mikroBUS_logWrite( " Accel X :", _LOG_TEXT ); IntToStr( accel_axis_x, logText ); mikroBUS_logWrite( logText, _LOG_TEXT ); mikroBUS_logWrite( " | ", _LOG_TEXT ); mikroBUS_logWrite( " Gyro X :", _LOG_TEXT ); IntToStr( gyro_axis_x, logText ); mikroBUS_logWrite( logText, _LOG_LINE ); mikroBUS_logWrite( " Accel Y :", _LOG_TEXT ); IntToStr( accel_axis_y, logText ); mikroBUS_logWrite( logText, _LOG_TEXT ); mikroBUS_logWrite( " | ", _LOG_TEXT ); mikroBUS_logWrite( " Gyro Y :", _LOG_TEXT ); IntToStr( gyro_axis_y, logText ); mikroBUS_logWrite( logText, _LOG_LINE ); mikroBUS_logWrite( " Accel Z :", _LOG_TEXT ); IntToStr( accel_axis_z, logText ); mikroBUS_logWrite( logText, _LOG_TEXT ); mikroBUS_logWrite( " | ", _LOG_TEXT ); mikroBUS_logWrite( " Gyro Z :", _LOG_TEXT ); IntToStr( gyro_axis_z, logText ); mikroBUS_logWrite( logText, _LOG_LINE ); mikroBUS_logWrite( "-------------------------------------", _LOG_LINE ); Delay_1sec( ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C or SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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.
MIKROSDK
This Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click Board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
6DOF IMU 9 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.