Syntax
public class Hx711 : FilterableChangeObservableBase<FloatChangeResult, float>, IObservable<FloatChangeResult>, IDisposable
Constructors
Declaration
public Hx711(IDigitalOutputPort sck, IDigitalInputPort dout)
Parameters
Type |
Name |
Description |
IDigitalOutputPort |
sck |
|
IDigitalInputPort |
dout |
|
Hx711(IIODevice, IPin, IPin)
Creates an instance of the NAU7802 Driver class
Declaration
public Hx711(IIODevice device, IPin sck, IPin dout)
Parameters
Type |
Name |
Description |
IIODevice |
device |
|
IPin |
sck |
|
IPin |
dout |
|
Properties
Gain
Declaration
public Hx711.AdcGain Gain { get; }
Property Value
IsDisposed
Declaration
public bool IsDisposed { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsSleeping
Declaration
public bool IsSleeping { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
CalculateCalibrationFactor()
Calculates the calibration factor of the load cell. Call this method with a known weight on the sensor, and then use the returned value in a call to SetCalibrationFactor(Int32, Weight) before using the sensor.
Declaration
public int CalculateCalibrationFactor()
Returns
Type |
Description |
System.Int32 |
|
Dispose()
Dispose managed resources
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
GetWeight()
Gets the current sensor weight
Declaration
public Weight GetWeight()
Returns
SetCalibrationFactor(Int32, Weight)
Declaration
public void SetCalibrationFactor(int factor, Weight knownValue)
Parameters
Type |
Name |
Description |
System.Int32 |
factor |
|
Weight |
knownValue |
|
Sleep()
Puts the device into low-power sleep mode
Declaration
Tare()
Tares the sensor, effectively setting the current weight reading to relative zero.
Declaration
Wake()
Takes the device out of low-power sleep mode
Declaration