AMOS_IMU_UserGuide
In Nature Robotics Ltd. www.innaturerobotics.com
Serial.print(imu.a.z);
Serial.print(", ");
Serial.print(imu.g.x);
Serial.print(", ");
Serial.print(imu.g.y);
Serial.print(", ");
Serial.print(imu.g.z);
Serial.print(", ");
Serial.print(imu.m_fTempDegC);
Serial.println();
delay(1000);
}
Raspberry Pi Sample Code
The following program collects data from the accelerometers, magnetometers, gyros,
and temperature sensors, and uses that information to compute accelerations, a
magnetic vector, angular rates, and roll, pitch, and yaw orientation angles. It requires
the IMU.cpp and IMU.h library files for the Raspberry Pi to be installed. These files are
available from the In Nature Robotics support page:
https://www.innaturerobotics.com/support
#include "../RemoteControlTest/IMU.h"
#include <pthread.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <memory>
//example program that tests out the operation of the AltIMU-10 v5 Gyro,
Accelerometer, Compass, and Altimeter from Pololu Electronics (www.pololu.com)
/**
* @brief return true if a magnetometer calibration flag (-magcal) was specified
in the program arguments
*