José Claudio / Mbed 2 deprecated ReadingGyro_ITG3205

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ITG3205.h Source File

ITG3205.h

00001 #ifndef ITG3205_H
00002 #define ITG3205_H
00003 
00004 #include "mbed.h"
00005 
00006 #define ITG3205_ADDR       0x68
00007 #define ITG3205_WHO_AM_I   0x00
00008 #define ITG3205_SMPLRT     0x15
00009 #define ITG3205_DLPFS      0x16
00010 #define ITG3205_INT_CFG    0x17
00011 #define ITG3205_INT_STATUS 0x1A
00012 #define ITG3205_PWRM       0x3E
00013 
00014 #define ITG3205_XMSB       0x1D
00015 #define ITG3205_XLSB       0x1E
00016 #define ITG3205_YMSB       0x1F
00017 #define ITG3205_YLSB       0x20
00018 #define ITG3205_ZMSB       0x21
00019 #define ITG3205_ZLSB       0x22
00020 
00021 class ITG3205 
00022 {
00023 
00024 public:
00025 
00026     ITG3205(PinName sda, PinName scl);
00027     void Write(char reg, char data);
00028     char Read(char data);
00029     bool isRawReady();
00030     float getGyroX(void);
00031     float getGyroY(void);
00032     float getGyroZ(void);
00033 private:
00034     I2C i2c;
00035 };
00036 
00037 #endif /* ITG3205_H */