ADXL345Sim

class wpilib.simulation.ADXL345Sim(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

Class to control a simulated ADXRS450 gyroscope.

Overloaded function.

  1. __init__(self: wpilib.simulation._simulation.ADXL345Sim, accel: wpilib._wpilib.ADXL345_I2C) -> None

Constructs from a ADXL345_I2C object.

Parameters

accel – ADXL345 accel to simulate

  1. __init__(self: wpilib.simulation._simulation.ADXL345Sim, accel: wpilib._wpilib.ADXL345_SPI) -> None

Constructs from a ADXL345_SPI object.

Parameters

accel – ADXL345 accel to simulate

setX(accel: float) None

Sets the X acceleration.

Parameters

accel – The X acceleration.

setY(accel: float) None

Sets the Y acceleration.

Parameters

accel – The Y acceleration.

setZ(accel: float) None

Sets the Z acceleration.

Parameters

accel – The Z acceleration.