Adafruit FXAS21002C Gyroscope Library
Public Member Functions | Public Attributes | List of all members
Adafruit_FXAS21002C Class Reference

Unified sensor driver for the Adafruit FXAS21002C breakout. More...

#include <Adafruit_FXAS21002C.h>

Inheritance diagram for Adafruit_FXAS21002C:

Public Member Functions

 Adafruit_FXAS21002C (int32_t sensorID=-1)
 Instantiates a new Adafruit_FXAS21002C class, including assigning a unique ID to the gyroscope for logging purposes. More...
 
bool begin (gyroRange_t rng=GYRO_RANGE_250DPS)
 Setup the HW. More...
 
bool getEvent (sensors_event_t *event)
 Gets the most recent sensor event. More...
 
void getSensor (sensor_t *sensor)
 Gets the sensor_t data. More...
 
void standby (boolean standby)
 Puts devince into/out of standby mode. More...
 

Public Attributes

gyroRawData_t raw
 

Detailed Description

Unified sensor driver for the Adafruit FXAS21002C breakout.

Constructor & Destructor Documentation

◆ 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
sensorIDThe unique ID to associate with the gyroscope.

Member Function Documentation

◆ begin()

bool Adafruit_FXAS21002C::begin ( gyroRange_t  rng = GYRO_RANGE_250DPS)

Setup the HW.

Parameters
rngThe range to set for the gyroscope, based on gyroRange_t
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]eventA 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]sensorA reference to the sensor_t instances where the gyroscope sensor info should be written.

◆ standby()

void Adafruit_FXAS21002C::standby ( boolean  standby)

Puts devince into/out of standby mode.

Parameters
standbyWhether we want to go into standby!

Member Data Documentation

◆ raw

gyroRawData_t Adafruit_FXAS21002C::raw

Raw gyroscope values from last sensor read


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