|
Files | |
file | mindsensors-accelerometer.h |
Mindsensors ACCEL-nx driver. | |
Defines | |
#define | MSAC_I2C_ADDR 0x02 |
#define | MSAC_CMD 0x41 |
#define | MSAC_X_TILT 0x42 |
#define | MSAC_Y_TILT 0x43 |
#define | MSAC_Z_TILT 0x44 |
#define | MSAC_X_ACCEL 0x45 |
#define | MSAC_Y_ACCEL 0x47 |
#define | MSAC_Z_ACCEL 0x49 |
#define | MSAC_RANGE_2_5 1 |
#define | MSAC_RANGE_3_3 2 |
#define | MSAC_RANGE_6_7 3 |
#define | MSAC_RANGE_10 4 |
Functions | |
bool | MSACreadTilt (tSensors link, int &x_tilt, int &y_tilt, int &z_tilt) |
bool | MSACreadAccel (tSensors link, int &x_accel, int &y_accel, int &z_accel) |
bool | MSACsendCmd (tSensors link, byte command) |
bool | MSACsetRange (tSensors link, int range) |
Variables | |
tByteArray | MSAC_I2CRequest |
tByteArray | MSAC_I2CReply |
ACCEL-nx Sensor
#define MSAC_CMD 0x41 |
MSAC command register
Definition at line 46 of file mindsensors-accelerometer.h.
#define MSAC_I2C_ADDR 0x02 |
MSAC I2C device address
Definition at line 44 of file mindsensors-accelerometer.h.
#define MSAC_RANGE_10 4 |
Acceleration up to 10G
Definition at line 59 of file mindsensors-accelerometer.h.
#define MSAC_RANGE_2_5 1 |
Acceleration up to 2.5G
Definition at line 56 of file mindsensors-accelerometer.h.
#define MSAC_RANGE_3_3 2 |
Acceleration up to 3.3G
Definition at line 57 of file mindsensors-accelerometer.h.
#define MSAC_RANGE_6_7 3 |
Acceleration up to 6.7G
Definition at line 58 of file mindsensors-accelerometer.h.
#define MSAC_X_ACCEL 0x45 |
MSAC Z acceleration data
Definition at line 52 of file mindsensors-accelerometer.h.
#define MSAC_X_TILT 0x42 |
MSAC X tilt data
Definition at line 48 of file mindsensors-accelerometer.h.
#define MSAC_Y_ACCEL 0x47 |
MSAC Z acceleration data
Definition at line 53 of file mindsensors-accelerometer.h.
#define MSAC_Y_TILT 0x43 |
MSAC Y tilt data
Definition at line 49 of file mindsensors-accelerometer.h.
#define MSAC_Z_ACCEL 0x49 |
MSAC Z acceleration data
Definition at line 54 of file mindsensors-accelerometer.h.
#define MSAC_Z_TILT 0x44 |
MSAC Z tilt data
Definition at line 50 of file mindsensors-accelerometer.h.
bool MSACreadAccel | ( | tSensors | link, |
int & | x_accel, | ||
int & | y_accel, | ||
int & | z_accel | ||
) |
Read tilt data from the sensor
link | the sensor port number |
x_accel | X acceleration data |
y_accel | Y acceleration data |
z_accel | Z acceleration data |
Definition at line 104 of file mindsensors-accelerometer.h.
bool MSACreadTilt | ( | tSensors | link, |
int & | x_tilt, | ||
int & | y_tilt, | ||
int & | z_tilt | ||
) |
Read tilt data from the sensor
link | the sensor port number |
x_tilt | X tilt data |
y_tilt | Y tilt data |
z_tilt | Z tilt data |
Definition at line 78 of file mindsensors-accelerometer.h.
bool MSACsendCmd | ( | tSensors | link, |
byte | command | ||
) |
Send a command to the sensor
link | the sensor port number |
command | the command to be sent |
Definition at line 128 of file mindsensors-accelerometer.h.
bool MSACsetRange | ( | tSensors | link, |
int | range | ||
) |
Set sensitivity range of sensor.
link | the sensor port number |
range | 1 = 2.5G, 2 = 3.3G, 3 = 6.7G, 4 = 10G |
Definition at line 146 of file mindsensors-accelerometer.h.
Array to hold I2C reply data
Definition at line 67 of file mindsensors-accelerometer.h.
Array to hold I2C command data
Definition at line 66 of file mindsensors-accelerometer.h.