Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class ADXL345_I2C

    java.lang.Object
      edu.wpi.first.wpilibj.SensorBase
          edu.wpi.first.wpilibj.ADXL345_I2C

    public class ADXL345_I2C

extends SensorBase

Author:
  dtjones

Nested Class Summary
`static class` | `ADXL345_I2C.AllAxes`
`static class` | `ADXL345_I2C.Axes`
`static class` | `ADXL345_I2C.DataFormat_Range`

Field Summary

Fields inherited from class edu.wpi.first.wpilibj.SensorBase
`kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond`

Constructor Summary
`ADXL345_I2C(int moduleNumber, ADXL345_I2C.DataFormat_Range range)` Constructor.

Method Summary
`double` | `getAcceleration(ADXL345_I2C.Axes axis)` Get the acceleration of one axis in Gs.
`ADXL345_I2C.AllAxes` | `getAccelerations()` Get the acceleration of all axes in Gs.

Methods inherited from class edu.wpi.first.wpilibj.SensorBase
`checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, free, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ADXL345_I2C

    public ADXL345_I2C(int moduleNumber,
                       ADXL345_I2C.DataFormat_Range range)

  Constructor.

  Parameters:
    `module` - The slot of the digital module that the sensor is plugged into.
    `range` - The range (+ or -) that the accelerometer will measure.

Method Detail

### getAcceleration

    public double getAcceleration(ADXL345_I2C.Axes axis)

  Get the acceleration of one axis in Gs.

  Parameters:
    `axis` - The axis to read from.
  Returns:
    Acceleration of the ADXL345 in Gs.

### getAccelerations

    public ADXL345_I2C.AllAxes getAccelerations()

  Get the acceleration of all axes in Gs.

  Returns:
    Acceleration measured on all axes of the ADXL345 in Gs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"