mpu9dof 2.0.0.0
|
MPU 9DOF click carries the MPU–9250 System in Package, which is the world’s first 9-axis Motion Tracking device. MPU–9250 comprises two chips. One is the MPU–6050 that contains a 3-axis accelerometer, a 3-axis gyroscope, and a DMP (digital motion processor); the other is AK8975, a 3-axis digital compass.
We provide a library for the Mpu9Dof 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.
This library contains API for Mpu9Dof Click driver.
- Initialization function.void mpu9dof_cfg_setup ( mpu9dof_cfg_t *cfg );
MPU9DOF_RETVAL mpu9dof_init ( mpu9dof_t *ctx, mpu9dof_cfg_t *cfg );
void mpu9dof_default_cfg ( mpu9dof_t *ctx );
- Function read Gyro X-axis, Y-axis and Z-axis axis.void mpu9dof_read_accel ( mpu9dof_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z );
void mpu9dof_read_gyro ( mpu9dof_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z );
void mpu9dof_read_mag ( mpu9dof_t *ctx, int16_t *mag_x, int16_t *mag_y, int16_t *mag_z );
MPU 9DOF click carries the world’s first 9-axis Motion Tracking device. It comprises two chips: one that contains a 3-axis accelerometer, a 3-axis gyroscope, and a DMP (digital motion processor); the other is a 3-axis digital compass.
The demo application is composed of two sections :
Initialization driver enable's - I2C, initialize MPU-9150 XL G & MPU-9150 MAG and start write log.
This is a example which demonstrates the use of MPU 9DOF Click board. Measured accel, gyro and magnetometar coordinates values ( X, Y, Z ) and temperature value in degrees celsius [ �C ] are being sent to the uart where you can track their changes. All data logs on usb uart for aproximetly every 1 sec.
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:
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.