C# Class CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L

Represents a device abstraction component for a Honeywell HMC5883L 3-axis Digital Compass IC.
Inheritance: ComponentBase, IMultiAxisGyro
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
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.Honeywell.HMC5883L. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L was occupying.

Enable ( ) : void

Enables the gyro.

HMC5883L ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L class. This is the default constructor.

HMC5883L ( II2CBus device ) : System

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

HMC5883L ( II2CBus device, Int32 address ) : System

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

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

Disable() public method

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

Dispose() public method

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

Enable() public method

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

HMC5883L() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L class. This is the default constructor.
public HMC5883L ( ) : System
return System

HMC5883L() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L 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 HMC5883L ( 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. ///
return System

HMC5883L() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.Honeywell.HMC5883L 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 HMC5883L ( II2CBus device, Int32 address ) : 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. ///
address System.Int32 /// The bus address of the device. ///
return System

Init() public method

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. ///
return IGyroscope

ReadGyro() public method

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

RecalibrateOffset() public method

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