C# Class CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345

Represents a device abstraction component for an Analog Devices ADXL345 High Resolution 3-axis Accelerometer.
See ADXL345.pdf for details.
Inheritance: ComponentBase, IMultiAxisGyro
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
ADXL345 ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class. This is the default constructor. The default constructor assumes a Revision 2 or higher Raspberry Pi host and that the ADXL345 is at address ADXL345.ADXL345_ADDRESS.

ADXL345 ( II2CBus device ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class with the I2C device that represents the physical connection to the gyro.

ADXL345 ( II2CBus device, Int32 busAddress ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class with the I2C device that represents the physical connection to the gyro and the bus address of the device.

Disable ( ) : void

Disables the gyro.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 was occupying.

Enable ( ) : void

Enables the gyro.

Init ( IGyroscope triggeringAxis, GyroTriggerMode mode ) : IGyroscope

Initializes the Gyro.

ReadGyro ( ) : void

Reads the gyro and stores the value internally.

RecalibrateOffset ( ) : void

Recalibrates the offset.

Method Details

ADXL345() public méthode

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class. This is the default constructor. The default constructor assumes a Revision 2 or higher Raspberry Pi host and that the ADXL345 is at address ADXL345.ADXL345_ADDRESS.
public ADXL345 ( ) : System
Résultat System

ADXL345() public méthode

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class with the I2C device that represents the physical connection to the gyro.
/// Unable to open the specified I2C bus device. /// /// The specified device instance has been disposed. ///
public ADXL345 ( II2CBus device ) : System
device II2CBus /// The I2C device that represents the physical connection to the gyro. /// If null, then it is assumed that the host is a revision 2 or higher /// board and a default /// using the rev 2 I2C bus path will be used instead. ///
Résultat System

ADXL345() public méthode

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 class with the I2C device that represents the physical connection to the gyro and the bus address of the device.
/// Unable to open the specified I2C bus device. /// /// The specified device instance has been disposed. ///
public ADXL345 ( II2CBus device, Int32 busAddress ) : System
device II2CBus /// The I2C device that represents the physical connection to the gyro. /// If null, then it is assumed that the host is a revision 2 or higher /// board and a default /// using the rev 2 I2C bus path will be used instead. ///
busAddress System.Int32 /// The bus address of the device. ///
Résultat System

Disable() public méthode

Disables the gyro.
/// Unable to write to gyro. /// /// This instance has been disposed. ///
public Disable ( ) : void
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Gyroscope.AnalogDevices.ADXL345 was occupying.
public Dispose ( ) : void
Résultat void

Enable() public méthode

Enables the gyro.
/// Unable to write to gyro. /// /// This instance has been disposed. ///
public Enable ( ) : void
Résultat void

Init() public méthode

Initializes the Gyro.
/// Unable to write to gyro. /// /// This instance has been disposed. ///
public Init ( IGyroscope triggeringAxis, GyroTriggerMode mode ) : IGyroscope
triggeringAxis IGyroscope /// The gyro that represents the single axis responsible for /// the triggering of updates. ///
mode GyroTriggerMode /// The gyro update trigger mode. ///
Résultat IGyroscope

ReadGyro() public méthode

Reads the gyro and stores the value internally.
/// An error occurred while reading from the gyro. /// /// This instance has been disposed. ///
public ReadGyro ( ) : void
Résultat void

RecalibrateOffset() public méthode

Recalibrates the offset.
/// Unable to write to gyro. /// /// This instance has been disposed. ///
public RecalibrateOffset ( ) : void
Résultat void