Class ADXL345_I2C

java.lang.Object
edu.wpi.first.wpilibj.ADXL345_I2C
All Implemented Interfaces:
NTSendable, Sendable, AutoCloseable

public class ADXL345_I2C
extends Object
implements NTSendable, AutoCloseable
ADXL345 I2C Accelerometer.

The Onboard I2C port is subject to system lockups. See WPILib Known Issues page for details.

  • Field Details

  • Constructor Details

    • ADXL345_I2C

      public ADXL345_I2C​(I2C.Port port, ADXL345_I2C.Range range)
      Constructs the ADXL345 Accelerometer with I2C address 0x1D.
      Parameters:
      port - The I2C port the accelerometer is attached to
      range - The range (+ or -) that the accelerometer will measure.
    • ADXL345_I2C

      public ADXL345_I2C​(I2C.Port port, ADXL345_I2C.Range range, int deviceAddress)
      Constructs the ADXL345 Accelerometer over I2C.
      Parameters:
      port - The I2C port the accelerometer is attached to
      range - The range (+ or -) that the accelerometer will measure.
      deviceAddress - I2C address of the accelerometer (0x1D or 0x53)
  • Method Details