|
| ADXL345_I2C (Port port, Range range=kRange_2G, int deviceAddress=kAddress) |
| Constructs the ADXL345 Accelerometer over I2C. More...
|
|
| ADXL345_I2C (const ADXL345_I2C &)=delete |
|
ADXL345_I2C & | operator= (const ADXL345_I2C &)=delete |
|
virtual void | SetRange (Range range) override |
| {Common interface for setting the measuring range of an accelerometer.- Parameters
-
range | The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges. |
}
|
|
virtual double | GetX () override |
| {Common interface for getting the x axis acceleration.- Returns
- The acceleration along the x axis in g-forces
}
|
|
virtual double | GetY () override |
| {Common interface for getting the y axis acceleration.- Returns
- The acceleration along the y axis in g-forces
}
|
|
virtual double | GetZ () override |
| {Common interface for getting the z axis acceleration.- Returns
- The acceleration along the z axis in g-forces
}
|
|
virtual double | GetAcceleration (Axes axis) |
| Get the acceleration of one axis in Gs. More...
|
|
virtual AllAxes | GetAccelerations () |
| Get the acceleration of all axes in Gs. More...
|
|
virtual std::string | GetSmartDashboardType () const override |
|
virtual void | InitTable (std::shared_ptr< ITable > subtable) override |
| Initializes a table for this sendable object. More...
|
|
virtual void | UpdateTable () override |
| Update the table for this sendable object with the latest values.
|
|
virtual std::shared_ptr< ITable > | GetTable () const override |
|
virtual void | StartLiveWindowMode () override |
| Start having this sendable object automatically respond to value changes reflect the value on the table.
|
|
virtual void | StopLiveWindowMode () override |
| Stop having this sendable object automatically respond to value changes.
|
|
| I2C (Port port, uint8_t deviceAddress) |
| Constructor. More...
|
|
virtual | ~I2C () |
| Destructor.
|
|
| I2C (const I2C &)=delete |
|
I2C & | operator= (const I2C &)=delete |
|
bool | Transaction (uint8_t *dataToSend, uint8_t sendSize, uint8_t *dataReceived, uint8_t receiveSize) |
| Generic transaction. More...
|
|
bool | AddressOnly () |
| Attempt to address a device on the I2C bus. More...
|
|
bool | Write (uint8_t registerAddress, uint8_t data) |
| Execute a write transaction with the device. More...
|
|
bool | WriteBulk (uint8_t *data, uint8_t count) |
| Execute a bulk write transaction with the device. More...
|
|
bool | Read (uint8_t registerAddress, uint8_t count, uint8_t *data) |
| Execute a read transaction with the device. More...
|
|
bool | ReadOnly (uint8_t count, uint8_t *buffer) |
| Execute a read only transaction with the device. More...
|
|
void | Broadcast (uint8_t registerAddress, uint8_t data) |
| Send a broadcast write to all devices on the I2C bus. More...
|
|
bool | VerifySensor (uint8_t registerAddress, uint8_t count, const uint8_t *expected) |
| Verify that a device's registers contain expected values. More...
|
|
ADXL345 Accelerometer on I2C.
This class allows access to a Analog Devices ADXL345 3-axis accelerometer on an I2C bus. This class assumes the default (not alternate) sensor address of 0x1D (7-bit address).