|
Files | |
file | mindsensors-imu.h |
Mindsensors AbsoluteIMU Sensor driver. | |
Defines | |
#define | MSIMU_IMU_I2C_ADDR 0x22 |
#define | MSIMU_REG_CMD 0x41 |
#define | MSIMU_REG_TILT_ALL_AXES 0x42 |
#define | MSIMU_REG_ACC_ALL_AXES 0x45 |
#define | MSIMU_REG_COMPASS_HEADING 0x4B |
#define | MSIMU_REG_COMPASS_ALL_FIELDS 0x4D |
#define | MSIMU_REG_GYRO_ALL_AXES 0x53 |
#define | MSIMU_REG_GYRO_FILTER 0x5A |
#define | MSIMU_CMD_COMPASS_START_CAL 0x43 |
#define | MSIMU_CMD_COMPASS_STOP_CAL 0x63 |
#define | MSIMU_CMD_ACC_RANGE_2G 0x31 |
#define | MSIMU_CMD_ACC_RANGE_4G 0x32 |
#define | MSIMU_CMD_ACC_RANGE_8G 0x33 |
#define | MSIMU_CMD_ACC_RANGE_16G 0x34 |
#define | MSIMU_GYRO_FILTER_NONE 0 |
#define | MSIMU_GYRO_FILTER_LEVEL_1 1 |
#define | MSIMU_GYRO_FILTER_LEVEL_2 2 |
#define | MSIMU_GYRO_FILTER_LEVEL_3 3 |
#define | MSIMU_GYRO_FILTER_LEVEL_4 4 |
#define | MSIMU_GYRO_FILTER_LEVEL_5 5 |
#define | MSIMU_GYRO_FILTER_LEVEL_6 6 |
#define | MSIMU_GYRO_FILTER_LEVEL_7 7 |
#define | MSIMU_TILT_X_AXIS MSIMU_REG_TILT_X_AXIS |
#define | MSIMU_TILT_Y_AXIS MSIMU_REG_TILT_Y_AXIS |
#define | MSIMU_TILT_Z_AXIS MSIMU_REG_TILT_Z_AXIS |
#define | MSIMU_ACC_X_AXIS MSIMU_REG_ACC_X_AXIS |
#define | MSIMU_ACC_Y_AXIS MSIMU_REG_ACC_Y_AXIS |
#define | MSIMU_ACC_Z_AXIS MSIMU_REG_ACC_Z_AXIS |
#define | MSIMU_GYRO_X_AXIS MSIMU_REG_GYRO_X_AXIS |
#define | MSIMU_GYRO_Y_AXIS MSIMU_REG_GYRO_Y_AXIS |
#define | MSIMU_GYRO_Z_AXIS MSIMU_REG_GYRO_Z_AXIS |
Functions | |
bool | _MSIMUsendCMD (tSensors link, ubyte cmd) |
bool | MSIMUreadTiltAxes (tSensors link, int &_x, int &_y, int &_z) |
bool | MSIMUreadGyroAxes (tSensors link, int &_x, int &_y, int &_z) |
bool | MSIMUreadAccelAxes (tSensors link, int &_x, int &_y, int &_z) |
bool | MSIMUreadMagneticFields (tSensors link, int &_x, int &_y, int &_z) |
int | MSIMUreadHeading (tSensors link) |
bool | MSIMUsetGyroFilter (tSensors link, ubyte level) |
Variables | |
tByteArray | MSIMU_I2CRequest |
tByteArray | MSIMU_I2CReply |
Mindsensors AbsoluteIMU Sensor (MSIMU) driver
#define MSIMU_ACC_X_AXIS MSIMU_REG_ACC_X_AXIS |
Definition at line 76 of file mindsensors-imu.h.
#define MSIMU_ACC_Y_AXIS MSIMU_REG_ACC_Y_AXIS |
Definition at line 77 of file mindsensors-imu.h.
#define MSIMU_ACC_Z_AXIS MSIMU_REG_ACC_Z_AXIS |
Definition at line 78 of file mindsensors-imu.h.
#define MSIMU_CMD_ACC_RANGE_16G 0x34 |
Accelerometer 16G range
Definition at line 60 of file mindsensors-imu.h.
#define MSIMU_CMD_ACC_RANGE_2G 0x31 |
Accelerometer 2G range
Definition at line 57 of file mindsensors-imu.h.
#define MSIMU_CMD_ACC_RANGE_4G 0x32 |
Accelerometer 4G range
Definition at line 58 of file mindsensors-imu.h.
#define MSIMU_CMD_ACC_RANGE_8G 0x33 |
Accelerometer 8G range
Definition at line 59 of file mindsensors-imu.h.
#define MSIMU_CMD_COMPASS_START_CAL 0x43 |
Accelerometer 2G range
Definition at line 54 of file mindsensors-imu.h.
#define MSIMU_CMD_COMPASS_STOP_CAL 0x63 |
Accelerometer 2G range
Definition at line 55 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_1 1 |
Gyro filter level: 1
Definition at line 63 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_2 2 |
Gyro filter level: 2
Definition at line 64 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_3 3 |
Gyro filter level: 3
Definition at line 65 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_4 4 |
Gyro filter level: 4 (default)
Definition at line 66 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_5 5 |
Gyro filter level: 5
Definition at line 67 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_6 6 |
Gyro filter level: 6
Definition at line 68 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_LEVEL_7 7 |
Gyro filter level: 7 (highest)
Definition at line 69 of file mindsensors-imu.h.
#define MSIMU_GYRO_FILTER_NONE 0 |
Gyro filter level: none
Definition at line 62 of file mindsensors-imu.h.
#define MSIMU_GYRO_X_AXIS MSIMU_REG_GYRO_X_AXIS |
Definition at line 80 of file mindsensors-imu.h.
#define MSIMU_GYRO_Y_AXIS MSIMU_REG_GYRO_Y_AXIS |
Definition at line 81 of file mindsensors-imu.h.
#define MSIMU_GYRO_Z_AXIS MSIMU_REG_GYRO_Z_AXIS |
Definition at line 82 of file mindsensors-imu.h.
#define MSIMU_IMU_I2C_ADDR 0x22 |
IMU I2C address
Definition at line 43 of file mindsensors-imu.h.
#define MSIMU_REG_ACC_ALL_AXES 0x45 |
All Axes for Accel
Definition at line 48 of file mindsensors-imu.h.
#define MSIMU_REG_CMD 0x41 |
Command register
Definition at line 45 of file mindsensors-imu.h.
#define MSIMU_REG_COMPASS_ALL_FIELDS 0x4D |
All magnetic fields for compass
Definition at line 50 of file mindsensors-imu.h.
#define MSIMU_REG_COMPASS_HEADING 0x4B |
Compass heading
Definition at line 49 of file mindsensors-imu.h.
#define MSIMU_REG_GYRO_ALL_AXES 0x53 |
All Axes for Gyro
Definition at line 51 of file mindsensors-imu.h.
#define MSIMU_REG_GYRO_FILTER 0x5A |
Filter level for Gyro
Definition at line 52 of file mindsensors-imu.h.
#define MSIMU_REG_TILT_ALL_AXES 0x42 |
All Axes for Tilt
Definition at line 47 of file mindsensors-imu.h.
#define MSIMU_TILT_X_AXIS MSIMU_REG_TILT_X_AXIS |
Definition at line 72 of file mindsensors-imu.h.
#define MSIMU_TILT_Y_AXIS MSIMU_REG_TILT_Y_AXIS |
Definition at line 73 of file mindsensors-imu.h.
#define MSIMU_TILT_Z_AXIS MSIMU_REG_TILT_Z_AXIS |
Definition at line 74 of file mindsensors-imu.h.
bool _MSIMUsendCMD | ( | tSensors | link, |
ubyte | cmd | ||
) |
Send a command to the sensor
Note: this is an internal function and should be called directly
link | the port number |
cmd | the command to be sent |
Definition at line 104 of file mindsensors-imu.h.
bool MSIMUreadAccelAxes | ( | tSensors | link, |
int & | _x, | ||
int & | _y, | ||
int & | _z | ||
) |
Read all of the accelerometer axes
link | the port number |
_x | variable to hold X axis data |
_y | variable to hold Y axis data |
_z | variable to hold Z axis data |
Definition at line 170 of file mindsensors-imu.h.
bool MSIMUreadGyroAxes | ( | tSensors | link, |
int & | _x, | ||
int & | _y, | ||
int & | _z | ||
) |
Read all three axes of the gyro
link | the port number |
_x | data for x axis in degrees per second |
_y | data for y axis in degrees per second |
_z | data for z axis in degrees per second |
Definition at line 147 of file mindsensors-imu.h.
int MSIMUreadHeading | ( | tSensors | link ) |
Read the current magnetic compass heading
link | the port number |
Definition at line 215 of file mindsensors-imu.h.
bool MSIMUreadMagneticFields | ( | tSensors | link, |
int & | _x, | ||
int & | _y, | ||
int & | _z | ||
) |
Read all the magnetic field strengths
link | the port number |
_x | variable to hold X axis data |
_y | variable to hold Y axis data |
_z | variable to hold Z axis data |
Definition at line 194 of file mindsensors-imu.h.
bool MSIMUreadTiltAxes | ( | tSensors | link, |
int & | _x, | ||
int & | _y, | ||
int & | _z | ||
) |
Read all three tilt axes
link | the port number |
_x | data for x axis in degrees per second |
_y | data for y axis in degrees per second |
_z | data for z axis in degrees per second |
Definition at line 123 of file mindsensors-imu.h.
bool MSIMUsetGyroFilter | ( | tSensors | link, |
ubyte | level | ||
) |
Set the level of filtering of the Gryo readings.
link | the port number |
level | the level of filtering (0-7) where 0 is none and 7 is the highest amount of filtering, 4 is the default level. |
Definition at line 234 of file mindsensors-imu.h.
Array to hold I2C reply data
Definition at line 85 of file mindsensors-imu.h.
Array to hold I2C command data
Definition at line 84 of file mindsensors-imu.h.