Unified sensor driver for the Adafruit FXAS21002C breakout.
More...
#include <Adafruit_FXAS21002C.h>
|
Adafruit_I2CDevice * | i2c_dev = NULL |
| Pointer to I2C bus interface.
|
|
Unified sensor driver for the Adafruit FXAS21002C breakout.
◆ Adafruit_FXAS21002C()
Adafruit_FXAS21002C::Adafruit_FXAS21002C |
( |
int32_t |
sensorID = -1 | ) |
|
Instantiates a new Adafruit_FXAS21002C class, including assigning a unique ID to the gyroscope for logging purposes.
- Parameters
-
sensorID | The unique ID to associate with the gyroscope. |
◆ begin()
bool Adafruit_FXAS21002C::begin |
( |
uint8_t |
addr = 0x21 , |
|
|
TwoWire * |
wire = &Wire |
|
) |
| |
Setup the HW.
- Parameters
-
addr | The I2C address of the sensor. |
wire | Pointer to Wire instance |
- Returns
- True if the device was successfully initialized, otherwise false.
◆ getEvent()
bool Adafruit_FXAS21002C::getEvent |
( |
sensors_event_t * |
event | ) |
|
Gets the most recent sensor event.
- Parameters
-
[out] | event | A reference to the sensors_event_t instances where the accelerometer data should be written. |
- Returns
- True if the event was successfully read, otherwise false.
◆ getSensor()
void Adafruit_FXAS21002C::getSensor |
( |
sensor_t * |
sensor | ) |
|
Gets the sensor_t data.
- Parameters
-
[out] | sensor | A reference to the sensor_t instances where the gyroscope sensor info should be written. |
◆ standby()
void Adafruit_FXAS21002C::standby |
( |
boolean |
standby | ) |
|
Puts device into/out of standby mode.
- Parameters
-
standby | Whether we want to go into standby! |
◆ setRange()
void Adafruit_FXAS21002C::setRange |
( |
gyroRange_t |
range | ) |
|
Set the gyroscope full scale range.
- Parameters
-
range | gyroscope full scale range |
◆ getRange()
Get the gyroscope full scale range.
- Returns
- gyroscope full scale range
The documentation for this class was generated from the following files: