Adafruit LSM303 Accelerometer Library
|
#include "WProgram.h"
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_I2CDevice.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>
Go to the source code of this file.
Classes | |
struct | lsm303AccelData_s |
INTERNAL ACCELERATION DATA TYPE. More... | |
class | Adafruit_LSM303_Accel_Unified |
Unified sensor driver for the accelerometer. More... | |
Macros | |
#define | LSM303_ADDRESS_ACCEL (0x32 >> 1) |
I2C address/bits, 0011001x. | |
#define | LSM303_ID (0b11010100) |
Chip ID. | |
Typedefs | |
typedef struct lsm303AccelData_s | lsm303AccelData |
INTERNAL ACCELERATION DATA TYPE. | |
typedef enum range | lsm303_accel_range_t |
Set of linear acceleration measurement ranges. | |
typedef enum mode | lsm303_accel_mode_t |
Set of different modes that can be used. Normal, high resolution, and low power. | |
Enumerations | |
enum | lsm303AccelRegisters_t { LSM303_REGISTER_ACCEL_WHO_AM_I = 0x0F, LSM303_REGISTER_ACCEL_CTRL_REG1_A = 0x20, LSM303_REGISTER_ACCEL_CTRL_REG2_A = 0x21, LSM303_REGISTER_ACCEL_CTRL_REG3_A = 0x22, LSM303_REGISTER_ACCEL_CTRL_REG4_A = 0x23, LSM303_REGISTER_ACCEL_CTRL_REG5_A = 0x24, LSM303_REGISTER_ACCEL_CTRL_REG6_A = 0x25, LSM303_REGISTER_ACCEL_REFERENCE_A = 0x26, LSM303_REGISTER_ACCEL_STATUS_REG_A = 0x27, LSM303_REGISTER_ACCEL_OUT_X_L_A = 0x28, LSM303_REGISTER_ACCEL_OUT_X_H_A = 0x29, LSM303_REGISTER_ACCEL_OUT_Y_L_A = 0x2A, LSM303_REGISTER_ACCEL_OUT_Y_H_A = 0x2B, LSM303_REGISTER_ACCEL_OUT_Z_L_A = 0x2C, LSM303_REGISTER_ACCEL_OUT_Z_H_A = 0x2D, LSM303_REGISTER_ACCEL_FIFO_CTRL_REG_A = 0x2E, LSM303_REGISTER_ACCEL_FIFO_SRC_REG_A = 0x2F, LSM303_REGISTER_ACCEL_INT1_CFG_A = 0x30, LSM303_REGISTER_ACCEL_INT1_SOURCE_A = 0x31, LSM303_REGISTER_ACCEL_INT1_THS_A = 0x32, LSM303_REGISTER_ACCEL_INT1_DURATION_A = 0x33, LSM303_REGISTER_ACCEL_INT2_CFG_A = 0x34, LSM303_REGISTER_ACCEL_INT2_SOURCE_A = 0x35, LSM303_REGISTER_ACCEL_INT2_THS_A = 0x36, LSM303_REGISTER_ACCEL_INT2_DURATION_A = 0x37, LSM303_REGISTER_ACCEL_CLICK_CFG_A = 0x38, LSM303_REGISTER_ACCEL_CLICK_SRC_A = 0x39, LSM303_REGISTER_ACCEL_CLICK_THS_A = 0x3A, LSM303_REGISTER_ACCEL_TIME_LIMIT_A = 0x3B, LSM303_REGISTER_ACCEL_TIME_LATENCY_A = 0x3C, LSM303_REGISTER_ACCEL_TIME_WINDOW_A = 0x3D } |
Registers. | |
enum | range { LSM303_RANGE_2G, LSM303_RANGE_4G, LSM303_RANGE_8G, LSM303_RANGE_16G } |
Set of linear acceleration measurement ranges. More... | |
enum | mode { LSM303_MODE_NORMAL, LSM303_MODE_HIGH_RESOLUTION, LSM303_MODE_LOW_POWER } |
Set of different modes that can be used. Normal, high resolution, and low power. More... | |
enum range |
Set of linear acceleration measurement ranges.
enum mode |