Snippet Tag: Gyro sensor L3G4200

Gyro sensor library

/************************************************************************** I2C ADDRESS/BITS **************************************************************************/ #define L3G4200D_DEFAULT_ADDRESS_GYRO (0x68) // 1101000b #define L3G4200D_ADDRESS_GYRO_UPDATED (0x69) // 1101001b #define L3G4200D_GYRO_DEV_ID (0xD3) // 1101 0011 /************************************************************************** CONVERSION DELAY (in mS) **************************************************************************/ #define L3G4200D_CONVERSIONDELAY (100) /************************************************************************** GYROSCOPE REGISTERS **************************************************************************/ #define L3G4200D_REG_GYRO_WHO_AM_I (0x0F) // Device identification Register #define L3G4200D_REG_GYRO_CTRL_REG1 (0x20) // Gyroscope Control Register 1 #define L3G4200D_REG_GYRO_CTRL_REG2 (0x21) // Gyroscope Control Register 2 #define L3G4200D_REG_GYRO_CTRL_REG3 (0x22) // Gyroscope Control Register 3 #define L3G4200D_REG_GYRO_CTRL_REG4 (0x23) // Gyroscope Control Register 4 #define L3G4200D_REG_GYRO_CTRL_REG5 (0x24) // Gyroscope Control Register 5 #define L3G4200D_REG_GYRO_REFERENCE (0x25) // Reference/Datacapture Register #define L3G4200D_REG_TEMPERATURE_OUT (0x26) // Temperature Data Output Register #define L3G4200D_REG_GYRO_STATUS (0x27) // Status Register

Read More »