diff options
author | HampusM <hampus@hampusmat.com> | 2021-12-19 20:14:11 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-12-19 20:14:11 +0100 |
commit | 991381a67d00f2fa8dcf0475172b0151b4310385 (patch) | |
tree | 5f2b46a584c1c5261f3276687eb7fd98c561572a /gyroscope.hpp | |
parent | 4fdb27130e3c53c9a55cc73b8975aae733a03e90 (diff) |
refactor: use the GY521 sensor instead
Diffstat (limited to 'gyroscope.hpp')
-rw-r--r-- | gyroscope.hpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/gyroscope.hpp b/gyroscope.hpp deleted file mode 100644 index b57eafa..0000000 --- a/gyroscope.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#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 Gyroscope -{ -public: - void setup(int id); - void readCoordinates(int16_t *x, int16_t *y, int16_t *z); - void writeRegistry(int8_t registry, int8_t value); - static int initialize(); - static int testRegistry(int gyroscope_id, int8_t registry); - -private: - int _gyroscope_id; - int16_t _read_next_coordinate(); -}; - -#endif
\ No newline at end of file |