Adafruit ADXL375 Library
Adafruit_ADXL375.h
Go to the documentation of this file.
1 /**************************************************************************/
17 /**************************************************************************/
18 #ifndef _ADAFRUIT_SENSOR_ADXL375_H
19 #define _ADAFRUIT_SENSOR_ADXL375_H
20 
21 #include "Arduino.h"
22 #include <Adafruit_ADXL343.h>
23 
24 /*=========================================================================
25  I2C ADDRESS/BITS
26  -----------------------------------------------------------------------*/
27 #define ADXL375_ADDRESS (0x53)
28 /*=========================================================================*/
29 
30 /*=========================================================================
31  REGISTERS ARE SAME AS ADXL343!
32  -----------------------------------------------------------------------*/
33 /*=========================================================================*/
34 
35 /*=========================================================================
36  REGISTERS
37  -----------------------------------------------------------------------*/
38 #define ADXL375_MG2G_MULTIPLIER (0.049)
39 /*=========================================================================*/
40 
44 class Adafruit_ADXL375 : public Adafruit_ADXL343 {
45 public:
46  Adafruit_ADXL375(int32_t sensorID);
47  Adafruit_ADXL375(int32_t sensorID, TwoWire *wireBus);
48  Adafruit_ADXL375(uint8_t cs, SPIClass *theSPI, int32_t sensorID = -1);
49  Adafruit_ADXL375(uint8_t clock, uint8_t miso, uint8_t mosi, uint8_t cs,
50  int32_t sensorID = -1);
51 
52  bool begin(uint8_t i2caddr = ADXL375_ADDRESS);
53 
54  // these don't actually do anything
55  void setRange(adxl34x_range_t range);
56  adxl34x_range_t getRange(void);
57 
58  bool getEvent(sensors_event_t *);
59  void getSensor(sensor_t *);
60 
61 private:
62 };
63 
64 #endif
Definition: Adafruit_ADXL375.h:44
adxl34x_range_t getRange(void)
Sets the g range for the accelerometer.
Definition: Adafruit_ADXL375.cpp:166
void getSensor(sensor_t *)
Gets the sensor_t data.
Definition: Adafruit_ADXL375.cpp:202
#define ADXL375_ADDRESS
Definition: Adafruit_ADXL375.h:27
bool begin(uint8_t i2caddr=ADXL375_ADDRESS)
Setups the HW (reads coefficients values, etc.)
Definition: Adafruit_ADXL375.cpp:83
void setRange(adxl34x_range_t range)
Sets the g range for the accelerometer, cannot be changed!
Definition: Adafruit_ADXL375.cpp:157
bool getEvent(sensors_event_t *)
Gets the most recent sensor event.
Definition: Adafruit_ADXL375.cpp:177
Adafruit_ADXL375(int32_t sensorID)
Instantiates a new ADXL375 class.
Definition: Adafruit_ADXL375.cpp:32