Treehopper C++ API
Adxl345.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "Adxl345Registers.h"
5 #include "Accelerometer.h"
6 
7 namespace Treehopper {
8  namespace Libraries {
9  namespace Sensors {
10  namespace Inertial {
11  class LIBRARIES_API Adxl345 : virtual public Accelerometer {
12  public:
13  Adxl345(I2c &i2c, bool altAddress = false, int rate = 100);
14 
15  void update();
16 
17  private:
18  Adxl345Registers registers;
19  SMBusDevice _dev;
20  };
21  }
22  }
23  }
24 }
Base I2c interface.
Definition: I2c.h:10
Definition: SMBusDevice.h:7
#define LIBRARIES_API
Definition: Treehopper.Libraries.h:17
Definition: AdcPin.h:3