ADXL362

class wpilib.ADXL362(*args, **kwargs)

Bases: wpilib.ErrorBase, wpilib.interfaces.Accelerometer, wpilib.Sendable

ADXL362 SPI Accelerometer.

This class allows access to an Analog Devices ADXL362 3-axis accelerometer.

Overloaded function.

  1. __init__(self: wpilib._wpilib.ADXL362, range: wpilib.interfaces._interfaces.Accelerometer.Range = <Range.kRange_2G: 0>) -> None

Constructor. Uses the onboard CS1.

Parameters

range – The range (+ or -) that the accelerometer will measure.

  1. __init__(self: wpilib._wpilib.ADXL362, port: wpilib._wpilib.SPI.Port, range: wpilib.interfaces._interfaces.Accelerometer.Range = <Range.kRange_2G: 0>) -> None

Constructor.

Parameters
  • port – The SPI port the accelerometer is attached to

  • range – The range (+ or -) that the accelerometer will measure.

class AllAxes(self: wpilib._wpilib.ADXL362.AllAxes) → None

Bases: pybind11_builtins.pybind11_object

property XAxis
property YAxis
property ZAxis
class Axes(self: wpilib._wpilib.ADXL362.Axes, value: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

kAxis_X

kAxis_Y

kAxis_Z

kAxis_X = <Axes.kAxis_X: 0>
kAxis_Y = <Axes.kAxis_Y: 2>
kAxis_Z = <Axes.kAxis_Z: 4>
property name
getAcceleration(self: wpilib.ADXL362, axis: wpilib._wpilib.ADXL362.Axes) → float

Get the acceleration of one axis in Gs.

Parameters

axis – The axis to read from.

Returns

Acceleration of the ADXL362 in Gs.

getAccelerations(self: wpilib.ADXL362) → wpilib._wpilib.ADXL362.AllAxes

Get the acceleration of all axes in Gs.

Returns

An object containing the acceleration measured on each axis of the ADXL362 in Gs.

getX(self: wpilib.ADXL362) → float
getY(self: wpilib.ADXL362) → float
getZ(self: wpilib.ADXL362) → float
initSendable(self: wpilib.ADXL362, builder: wpilib.SendableBuilder) → None
setRange(self: wpilib.ADXL362, range: wpilib.interfaces._interfaces.Accelerometer.Range) → None