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]
Rating:
Author: MIKROE
Last Updated: 2019-04-11
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 4152 times
Not followed.
License: MIT license
6DOF IMU 8 click is an advanced 6-axis motion tracking Click board, which utilizes the ISM330DLC, a high-performance System in Package (SiP), equipped with a 3-axis gyroscope, and a 3-axis accelerometer.
Do you want to subscribe in order to receive notifications regarding "6DOF IMU 8 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "6DOF IMU 8 click" changes.
Do you want to report abuse regarding "6DOF IMU 8 click".
Library Description
The library performs a control of the 6DOF IMU 8 Click board, which is able to measure the accelerometer, gyroscope, temperature and magnetometer axis data. The full scale range and data rate are adjustable for each measurement. 6DOF IMU 8 Click board has two serial interface, SPI and I2C. There is also a more others settings and configurations which the user can use to set a device for the desired operation mode. For more details check documentation.
Key functions:
void c6dofimu8_getData( T_c6dofimu8_axis *accelOut, T_c6dofimu8_axis *gyroOut, int8_t *tempOut )
- Function performs a data reading and all necessary calculations to get accelerometer, gyroscope and temperature data.T_C6DOFIMU8_RETVAL c6dofimu8_setFSR( uint8_t gyro_fsr, uint8_t accel_fsr )
- Function selects a measurement full scale range.T_C6DOFIMU8_RETVAL c6dofimu8_setODR( uint8_t gyro_odr, uint8_t accel_odr )
- Function selects a measurement output data rate.Examples description
The application is composed of the three sections :
void applicationTask()
{
dataReady = c6dofimu8_getDRDYStatus( _C6DOFIMU8_TEMP_DRDY_MASK | _C6DOFIMU8_G_DRDY_MASK | _C6DOFIMU8_XL_DRDY_MASK );
while (dataReady == _C6DOFIMU8_EVENT_NOT_DETECTED)
{
dataReady = c6dofimu8_getDRDYStatus( _C6DOFIMU8_TEMP_DRDY_MASK | _C6DOFIMU8_G_DRDY_MASK | _C6DOFIMU8_XL_DRDY_MASK );
}
c6dofimu8_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( 300 );
}
Additional Functions :
Other mikroE Libraries used in the example:
I2C
UART
SPI
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.