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
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 |
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.
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.
"For updated information see the Java FRC site"