Zumo32U4 library
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
L3G Class Reference

Interfaces with the gyro. More...

#include <Zumo32U4.h>

Classes

struct  vector
 

Public Types

enum  deviceType { device_4200D, device_D20, device_D20H, device_auto }
 
enum  sa0State { sa0_low, sa0_high, sa0_auto }
 
enum  regAddr {
  WHO_AM_I = 0x0F, CTRL1 = 0x20, CTRL_REG1 = 0x20, CTRL2 = 0x21,
  CTRL_REG2 = 0x21, CTRL3 = 0x22, CTRL_REG3 = 0x22, CTRL4 = 0x23,
  CTRL_REG4 = 0x23, CTRL5 = 0x24, CTRL_REG5 = 0x24, REFERENCE = 0x25,
  OUT_TEMP = 0x26, STATUS = 0x27, STATUS_REG = 0x27, OUT_X_L = 0x28,
  OUT_X_H = 0x29, OUT_Y_L = 0x2A, OUT_Y_H = 0x2B, OUT_Z_L = 0x2C,
  OUT_Z_H = 0x2D, FIFO_CTRL = 0x2E, FIFO_CTRL_REG = 0x2E, FIFO_SRC = 0x2F,
  FIFO_SRC_REG = 0x2F, IG_CFG = 0x30, INT1_CFG = 0x30, IG_SRC = 0x31,
  INT1_SRC = 0x31, IG_THS_XH = 0x32, INT1_THS_XH = 0x32, IG_THS_XL = 0x33,
  INT1_THS_XL = 0x33, IG_THS_YH = 0x34, INT1_THS_YH = 0x34, IG_THS_YL = 0x35,
  INT1_THS_YL = 0x35, IG_THS_ZH = 0x36, INT1_THS_ZH = 0x36, IG_THS_ZL = 0x37,
  INT1_THS_ZL = 0x37, IG_DURATION = 0x38, INT1_DURATION = 0x38, LOW_ODR = 0x39
}
 

Public Member Functions

bool init (deviceType device=device_auto, sa0State sa0=sa0_auto)
 
deviceType getDeviceType (void)
 
void enableDefault (void)
 
void writeReg (byte reg, byte value)
 
byte readReg (byte reg)
 
void read (void)
 
void setTimeout (unsigned int timeout)
 
unsigned int getTimeout (void)
 
bool timeoutOccurred (void)
 

Static Public Member Functions

template<typename Ta , typename Tb , typename To >
static void vector_cross (const vector< Ta > *a, const vector< Tb > *b, vector< To > *out)
 
template<typename Ta , typename Tb >
static float vector_dot (const vector< Ta > *a, const vector< Tb > *b)
 
static void vector_normalize (vector< float > *a)
 

Public Attributes

vector< int16_t > g
 
byte last_status
 

Detailed Description

Interfaces with the gyro.

For complete documentation of this class, see https://github.com/pololu/l3g-arduino

Definition at line 6 of file L3G.h.


The documentation for this class was generated from the following files: