#include <Adafruit_ADXL375.h>
Driver for the Adafruit ADXL375 breakout.
◆ Adafruit_ADXL375() [1/4]
Adafruit_ADXL375::Adafruit_ADXL375 |
( |
int32_t |
sensorID | ) |
|
Instantiates a new ADXL375 class.
- Parameters
-
sensorID | An optional ID # so you can track this sensor, it will tag sensorEvents you create. |
◆ Adafruit_ADXL375() [2/4]
Adafruit_ADXL375::Adafruit_ADXL375 |
( |
int32_t |
sensorID, |
|
|
TwoWire * |
wireBus |
|
) |
| |
Instantiates a new ADXL375 class.
- Parameters
-
sensorID | An optional ID # so you can track this sensor, it will tag sensorEvents you create. |
wireBus | TwoWire instance to use for I2C communication. |
◆ Adafruit_ADXL375() [3/4]
Adafruit_ADXL375::Adafruit_ADXL375 |
( |
uint8_t |
cs, |
|
|
SPIClass * |
theSPI, |
|
|
int32_t |
sensorID = -1 |
|
) |
| |
Instantiates a new ADXL375 class in hardware SPI mode.
- Parameters
-
cs | The CS/SSEL pin |
theSPI | SPIClass instance to use for SPI communication. |
sensorID | An optional ID # so you can track this sensor, it will tag sensorEvents you create. |
◆ Adafruit_ADXL375() [4/4]
Adafruit_ADXL375::Adafruit_ADXL375 |
( |
uint8_t |
clock, |
|
|
uint8_t |
miso, |
|
|
uint8_t |
mosi, |
|
|
uint8_t |
cs, |
|
|
int32_t |
sensorID = -1 |
|
) |
| |
Instantiates a new ADXL375 class in software SPI mode.
- Parameters
-
clock | The SCK pin |
miso | The MISO pin |
mosi | The MOSI pin |
cs | The CS/SSEL pin |
sensorID | An optional ID # so you can track this sensor, it will tag sensoorEvents you create. |
◆ begin()
Setups the HW (reads coefficients values, etc.)
- Parameters
-
i2caddr | The 7-bit I2C address to find the ADXL on |
- Returns
- True if the sensor was successfully initialised.
◆ setRange()
void Adafruit_ADXL375::setRange |
( |
adxl34x_range_t |
range | ) |
|
Sets the g range for the accelerometer, cannot be changed!
- Parameters
-
range | Unused range argument |
◆ getRange()
adxl34x_range_t Adafruit_ADXL375::getRange |
( |
void |
| ) |
|
Sets the g range for the accelerometer.
- Returns
- Always returns 0
◆ getEvent()
bool Adafruit_ADXL375::getEvent |
( |
sensors_event_t * |
event | ) |
|
Gets the most recent sensor event.
- Parameters
-
event | Pointer to the sensors_event_t placeholder |
- Returns
- True of the read request was successful.
◆ getSensor()
void Adafruit_ADXL375::getSensor |
( |
sensor_t * |
sensor | ) |
|
Gets the sensor_t data.
- Parameters
-
sensor | Pointer to the sensor_t placeholder. |
The documentation for this class was generated from the following files: