#ifndef GYROSCOPE_H #define GYROSCOPE_H namespace Addresses { const int ID_HIGH = 0b1101011; const int ID_LOW = 0b1101010; const int WHO_ID = 0xD7; } namespace RegisterAddresses { const int WHO_AM_I = 0x0F; const int LOW_ODR = 0x39; const int CTRL4 = 0x23; const int CTRL1 = 0x20; const int OUT_X_L = 0x28; } class ReadGyroscopeData { public: int16_t x, y, z; }; class Gyroscope { public: int gyroscope_id; Gyroscope(int gyroscope_id); ReadGyroscopeData read(); void writeRegistry(uint8_t registry, uint8_t value); static int initialize(); static int testRegistry(int gyroscope_id, uint8_t registry); }; #endif