Adafruit ADXL375 Library
Public Member Functions | List of all members
Adafruit_ADXL375 Class Reference

#include <Adafruit_ADXL375.h>

Inheritance diagram for Adafruit_ADXL375:

Public Member Functions

 Adafruit_ADXL375 (int32_t sensorID)
 Instantiates a new ADXL375 class. More...
 
 Adafruit_ADXL375 (int32_t sensorID, TwoWire *wireBus)
 Instantiates a new ADXL375 class. More...
 
 Adafruit_ADXL375 (uint8_t cs, SPIClass *theSPI, int32_t sensorID=-1)
 Instantiates a new ADXL375 class in hardware SPI mode. More...
 
 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. More...
 
bool begin (uint8_t i2caddr=ADXL375_ADDRESS)
 Setups the HW (reads coefficients values, etc.) More...
 
void setRange (adxl34x_range_t range)
 Sets the g range for the accelerometer, cannot be changed! More...
 
adxl34x_range_t getRange (void)
 Sets the g range for the accelerometer. More...
 
bool getEvent (sensors_event_t *)
 Gets the most recent sensor event. More...
 
void getSensor (sensor_t *)
 Gets the sensor_t data. More...
 

Detailed Description

Driver for the Adafruit ADXL375 breakout.

Constructor & Destructor Documentation

◆ Adafruit_ADXL375() [1/4]

Adafruit_ADXL375::Adafruit_ADXL375 ( int32_t  sensorID)

Instantiates a new ADXL375 class.

Parameters
sensorIDAn 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
sensorIDAn optional ID # so you can track this sensor, it will tag sensorEvents you create.
wireBusTwoWire 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
csThe CS/SSEL pin
theSPISPIClass instance to use for SPI communication.
sensorIDAn 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
clockThe SCK pin
misoThe MISO pin
mosiThe MOSI pin
csThe CS/SSEL pin
sensorIDAn optional ID # so you can track this sensor, it will tag sensoorEvents you create.

Member Function Documentation

◆ begin()

bool Adafruit_ADXL375::begin ( uint8_t  i2caddr = ADXL375_ADDRESS)

Setups the HW (reads coefficients values, etc.)

Parameters
i2caddrThe 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
rangeUnused 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
eventPointer 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
sensorPointer to the sensor_t placeholder.

The documentation for this class was generated from the following files: