- //uint8_t i, err;
-
- //MPU9150_I2C_ADDRESS = 0x0C; //change Adress to Compass
-
- /* XXX doesn't work, no answer from magneto */
- /* for (i = 0; i < 127; i++) { */
- /* printf_P(PSTR("i=%d\r\n"), i); */
- /* err = send_mpu6050_cmd(i, 0x0A, 0x00); //PowerDownMode */
-
- /* if (err == 0) */
- /* printf_P(PSTR("COIN\r\n")); */
- /* } */
- send_mpu6050_cmd(MPU6050_MAGNETO_ADDRESS, 0x0A, 0x00); //PowerDownMode
- send_mpu6050_cmd(MPU6050_MAGNETO_ADDRESS, 0x0A, 0x0F); //SelfTest
- send_mpu6050_cmd(MPU6050_MAGNETO_ADDRESS, 0x0A, 0x00); //PowerDownMode
-
- //MPU9150_I2C_ADDRESS = 0x69; //change Adress to MPU
+ /* here we configure the mpu9150 to poll the magnetometer.
+ * See "MPU-9150 Register Map and Descriptions" section 4.14 */