6DOF IMU 15 Click Board
6DOF IMU 15 Click Board
The 6DOF IMU 15 Click Board™ 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 ASM330LHH, an automotive 6-axis MEMS motion tracking device, from STMicroelectronics. It has a configurable host interface that supports both I2C and SPI serial communication, features a 3 kB FIFO and a programmable interrupt with ultra-low-power event-detection support to minimize system power consumption. This Click Board™ is an excellent choice for applications like gesture recognition, activity classification, dead reckoning, pedometers, Telematics, eTolling, anti-theft systems, and more.
The 6DOF IMU 15 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the 6DOF IMU 15 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 that enable the 6DOF IMU 15 Click Board™. It initializes and defines the I2C bus driver and drivers that offer a plethora of settings. The library also offers functions that allow reading of accelerometer, gyroscope and temperature, as well as generic read and write function that offers reading( and writing) of different lengths of data.
Key Functions
void c6dofimu15_acceleration_rate ( float *x_acel_rte, float *y_acel_rte, float *z_acel_rte );
- Function is used to calculate acceleration rate in milligravities.void c6dofimu15_angular_rate ( float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
- Function is used to calculate angular rate in milidegrees per second.float c6dofimu15_read_temp_out ( );
- Function is used to read the temperature in degree Centigrade.
Example Description
The application is composed of three sections :
- System Initialization - Initializes SPI and I2C modules, LOG and GPIO structures, sets INT pin as an input.
- Application Initialization - Initializes SPI and I2C drivers, performs safety check, applies default setup and writes a log.
- Application Task - Demonstrates use of 6DOF IMU 6 click board by reading angular rate in millidegrees per second, and linear acceleration rate in milligravities and displaying data via USART terminal.
void application_task ( ) { c6dofimu15_angular_rate( &x_gyro, &y_gyro, &z_gyro ); mikrobus_logWrite( "Angular rate: ", _LOG_LINE ); FloatToStr( x_gyro, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); FloatToStr( y_gyro, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); FloatToStr( z_gyro, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mdps", _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); c6dofimu15_acceleration_rate( &x_accel, &y_accel, &z_accel ); mikrobus_logWrite( "Acceleration rate: ", _LOG_LINE ); FloatToStr( x_accel, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); FloatToStr( y_accel, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); FloatToStr( z_accel, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mg", _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The 6DOF IMU 15 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 15 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.