Zumo32U4 library
Classes | Enumerations
Zumo32U4IMU.h File Reference

Go to the source code of this file.

Classes

class  Zumo32U4IMU
 Interfaces with the inertial sensors on the Zumo 32U4. More...
 
struct  Zumo32U4IMU::vector< T >
 Represents a 3-dimensional vector with x, y, and z components. More...
 

Macros

Device Addresses

#define LSM303D_ADDR   0b0011101
 
#define L3GD20H_ADDR   0b1101011
 
#define LSM6DS33_ADDR   0b1101011
 
#define LIS3MDL_ADDR   0b0011110
 
Register Addresses

#define LSM303D_REG_STATUS_M   0x07
 
#define LSM303D_REG_OUT_X_L_M   0x08
 
#define LSM303D_REG_WHO_AM_I   0x0F
 
#define LSM303D_REG_CTRL1   0x20
 
#define LSM303D_REG_CTRL2   0x21
 
#define LSM303D_REG_CTRL5   0x24
 
#define LSM303D_REG_CTRL6   0x25
 
#define LSM303D_REG_CTRL7   0x26
 
#define LSM303D_REG_STATUS_A   0x27
 
#define LSM303D_REG_OUT_X_L_A   0x28
 
#define L3GD20H_REG_WHO_AM_I   0x0F
 
#define L3GD20H_REG_CTRL1   0x20
 
#define L3GD20H_REG_CTRL4   0x23
 
#define L3GD20H_REG_STATUS   0x27
 
#define L3GD20H_REG_OUT_X_L   0x28
 
#define LSM6DS33_REG_WHO_AM_I   0x0F
 
#define LSM6DS33_REG_CTRL1_XL   0x10
 
#define LSM6DS33_REG_CTRL2_G   0x11
 
#define LSM6DS33_REG_CTRL3_C   0x12
 
#define LSM6DS33_REG_STATUS_REG   0x1E
 
#define LSM6DS33_REG_OUTX_L_G   0x22
 
#define LSM6DS33_REG_OUTX_L_XL   0x28
 
#define LIS3MDL_REG_WHO_AM_I   0x0F
 
#define LIS3MDL_REG_CTRL_REG1   0x20
 
#define LIS3MDL_REG_CTRL_REG2   0x21
 
#define LIS3MDL_REG_CTRL_REG3   0x22
 
#define LIS3MDL_REG_CTRL_REG4   0x23
 
#define LIS3MDL_REG_STATUS_REG   0x27
 
#define LIS3MDL_REG_OUT_X_L   0x28
 

Enumerations

enum class  Zumo32U4IMUType : uint8_t { Unknown , LSM303D_L3GD20H , LSM6DS33_LIS3MDL }
 The type of the inertial sensors. More...
 

Macro Definition Documentation

◆ L3GD20H_ADDR

#define L3GD20H_ADDR   0b1101011

Definition at line 13 of file Zumo32U4IMU.h.

◆ L3GD20H_REG_CTRL1

#define L3GD20H_REG_CTRL1   0x20

Definition at line 35 of file Zumo32U4IMU.h.

◆ L3GD20H_REG_CTRL4

#define L3GD20H_REG_CTRL4   0x23

Definition at line 36 of file Zumo32U4IMU.h.

◆ L3GD20H_REG_OUT_X_L

#define L3GD20H_REG_OUT_X_L   0x28

Definition at line 38 of file Zumo32U4IMU.h.

◆ L3GD20H_REG_STATUS

#define L3GD20H_REG_STATUS   0x27

Definition at line 37 of file Zumo32U4IMU.h.

◆ L3GD20H_REG_WHO_AM_I

#define L3GD20H_REG_WHO_AM_I   0x0F

Definition at line 34 of file Zumo32U4IMU.h.

◆ LIS3MDL_ADDR

#define LIS3MDL_ADDR   0b0011110

Definition at line 15 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_CTRL_REG1

#define LIS3MDL_REG_CTRL_REG1   0x20

Definition at line 49 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_CTRL_REG2

#define LIS3MDL_REG_CTRL_REG2   0x21

Definition at line 50 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_CTRL_REG3

#define LIS3MDL_REG_CTRL_REG3   0x22

Definition at line 51 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_CTRL_REG4

#define LIS3MDL_REG_CTRL_REG4   0x23

Definition at line 52 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_OUT_X_L

#define LIS3MDL_REG_OUT_X_L   0x28

Definition at line 54 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_STATUS_REG

#define LIS3MDL_REG_STATUS_REG   0x27

Definition at line 53 of file Zumo32U4IMU.h.

◆ LIS3MDL_REG_WHO_AM_I

#define LIS3MDL_REG_WHO_AM_I   0x0F

Definition at line 48 of file Zumo32U4IMU.h.

◆ LSM303D_ADDR

#define LSM303D_ADDR   0b0011101

Definition at line 12 of file Zumo32U4IMU.h.

◆ LSM303D_REG_CTRL1

#define LSM303D_REG_CTRL1   0x20

Definition at line 26 of file Zumo32U4IMU.h.

◆ LSM303D_REG_CTRL2

#define LSM303D_REG_CTRL2   0x21

Definition at line 27 of file Zumo32U4IMU.h.

◆ LSM303D_REG_CTRL5

#define LSM303D_REG_CTRL5   0x24

Definition at line 28 of file Zumo32U4IMU.h.

◆ LSM303D_REG_CTRL6

#define LSM303D_REG_CTRL6   0x25

Definition at line 29 of file Zumo32U4IMU.h.

◆ LSM303D_REG_CTRL7

#define LSM303D_REG_CTRL7   0x26

Definition at line 30 of file Zumo32U4IMU.h.

◆ LSM303D_REG_OUT_X_L_A

#define LSM303D_REG_OUT_X_L_A   0x28

Definition at line 32 of file Zumo32U4IMU.h.

◆ LSM303D_REG_OUT_X_L_M

#define LSM303D_REG_OUT_X_L_M   0x08

Definition at line 24 of file Zumo32U4IMU.h.

◆ LSM303D_REG_STATUS_A

#define LSM303D_REG_STATUS_A   0x27

Definition at line 31 of file Zumo32U4IMU.h.

◆ LSM303D_REG_STATUS_M

#define LSM303D_REG_STATUS_M   0x07

Definition at line 23 of file Zumo32U4IMU.h.

◆ LSM303D_REG_WHO_AM_I

#define LSM303D_REG_WHO_AM_I   0x0F

Definition at line 25 of file Zumo32U4IMU.h.

◆ LSM6DS33_ADDR

#define LSM6DS33_ADDR   0b1101011

Definition at line 14 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_CTRL1_XL

#define LSM6DS33_REG_CTRL1_XL   0x10

Definition at line 41 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_CTRL2_G

#define LSM6DS33_REG_CTRL2_G   0x11

Definition at line 42 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_CTRL3_C

#define LSM6DS33_REG_CTRL3_C   0x12

Definition at line 43 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_OUTX_L_G

#define LSM6DS33_REG_OUTX_L_G   0x22

Definition at line 45 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_OUTX_L_XL

#define LSM6DS33_REG_OUTX_L_XL   0x28

Definition at line 46 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_STATUS_REG

#define LSM6DS33_REG_STATUS_REG   0x1E

Definition at line 44 of file Zumo32U4IMU.h.

◆ LSM6DS33_REG_WHO_AM_I

#define LSM6DS33_REG_WHO_AM_I   0x0F

Definition at line 40 of file Zumo32U4IMU.h.

Enumeration Type Documentation

◆ Zumo32U4IMUType

enum class Zumo32U4IMUType : uint8_t
strong

The type of the inertial sensors.

Enumerator
Unknown 

Unknown or unrecognized

LSM303D_L3GD20H 

LSM303D accelerometer + magnetometer, L3GD20H gyro

LSM6DS33_LIS3MDL 

LSM6DS33 gyro + accelerometer, LIS3MDL magnetometer

Definition at line 58 of file Zumo32U4IMU.h.