Remarks

Work in progress. This driver is not yet functional.

Characteristic Locus
Inheritance System.Object > Nau7802
Implements System.IDisposable
Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace Meadow.Foundation.Sensors.LoadCell
Assembly NAU7802.dll

Syntax

public class Nau7802 : IDisposable

Constructors

Nau7802(II2cBus)

Creates an instance of the NAU7802 Driver class

Declaration
public Nau7802(II2cBus bus)

Parameters

Type Name Description
II2cBus bus

Properties

Address

The peripheral's address on the I2C Bus

Declaration
public byte Address { get; }

Property Value

Type Description
System.Byte

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
public void Dispose()

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

Type Description
Weight

SetCalibrationFactor(Int32, Weight)

Sets the sensor's calibration factor based on a factor calculated with a know weight by calling CalculateCalibrationFactor().

Declaration
public void SetCalibrationFactor(int factor, Weight knownValue)

Parameters

Type Name Description
System.Int32 factor
Weight knownValue

Tare()

Tares the sensor, effectively setting the current weight reading to relative zero.

Declaration
public void Tare()