#include <stdio.h>
#define I2C_BUS 2
int main()
{
printf("\n");
printf("This will sample the magnetometer for the next 15 seconds\n");
printf("Rotate the board around in the air through as many orientations\n");
printf("as possible to collect sufficient data for calibration\n");
printf("Press any key to continue\n");
getchar();
printf("spin spin spin!!!\n\n");
printf("Failed to complete magnetometer calibration\n");
return -1;
}
printf("\nmagnetometer calibration file written\n");
printf("run rc_test_mpu to check performance\n");
return 0;
}
rc_mpu_config_t rc_mpu_default_config(void)
Returns an rc_mpu_config_t struct with default settings.
int rc_mpu_calibrate_mag_routine(rc_mpu_config_t conf)
Runs magnetometer calibration routine.
void rc_usleep(unsigned int us)
Sleep in microseconds.
configuration of the mpu sensor
Definition: mpu.h:155
int i2c_bus
which bus to use, default 2 on Robotics Cape and BB Blue
Definition: mpu.h:160