Meadow.Foundation.Sensors.LoadCell.Hx711 3.0.1-beta

This is a prerelease version of Meadow.Foundation.Sensors.LoadCell.Hx711.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Meadow.Foundation.Sensors.LoadCell.Hx711 --version 3.0.1-beta
                    
NuGet\Install-Package Meadow.Foundation.Sensors.LoadCell.Hx711 -Version 3.0.1-beta
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meadow.Foundation.Sensors.LoadCell.Hx711" Version="3.0.1-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meadow.Foundation.Sensors.LoadCell.Hx711" Version="3.0.1-beta" />
                    
Directory.Packages.props
<PackageReference Include="Meadow.Foundation.Sensors.LoadCell.Hx711" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meadow.Foundation.Sensors.LoadCell.Hx711 --version 3.0.1-beta
                    
#r "nuget: Meadow.Foundation.Sensors.LoadCell.Hx711, 3.0.1-beta"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meadow.Foundation.Sensors.LoadCell.Hx711@3.0.1-beta
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meadow.Foundation.Sensors.LoadCell.Hx711&version=3.0.1-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Meadow.Foundation.Sensors.LoadCell.Hx711&version=3.0.1-beta&prerelease
                    
Install as a Cake Tool

Meadow.Foundation.Sensors.LoadCell.Hx711

Hx711 digital load cell amplifier

The Hx711 library is included in the Meadow.Foundation.Sensors.LoadCell.Hx711 nuget package and is designed for the Wilderness Labs Meadow .NET IoT platform.

This driver is part of the Meadow.Foundation peripherals library, an open-source repository of drivers and libraries that streamline and simplify adding hardware to your C# .NET Meadow IoT applications.

For more information on developing for Meadow, visit developer.wildernesslabs.co.

To view all Wilderness Labs open-source projects, including samples, visit github.com/wildernesslabs.

Installation

You can install the library from within Visual Studio using the NuGet Package Manager or from the command line using the .NET CLI:

dotnet add package Meadow.Foundation.Sensors.LoadCell.Hx711

Usage

Hx711 loadSensor;

public int CalibrationFactor { get; set; } = 0; //9834945 - 8458935; // TODO: change this based on your scale (using the method provided below)
public double CalibrationWeight { get; set; } = 1.6; // TODO: enter the known-weight (in units below) you used in calibration

public override async Task Initialize()
{
    Resolver.Log.Info("Initialize...");

    loadSensor = new Hx711(Device.Pins.D04, Device.Pins.D03);

    if (CalibrationFactor == 0)
    {
        GetAndDisplayCalibrationUnits(loadSensor);
    }
    else
    {   // wait for the ADC to settle
        await Task.Delay(500);

        // Set the current load to be zero
        loadSensor.SetCalibrationFactor(CalibrationFactor, new Mass(CalibrationWeight, Mass.UnitType.Grams));
        loadSensor.Tare();
    }

    loadSensor.Updated += (sender, values) => Resolver.Log.Info($"Mass is now returned {values.New.Grams:N2}g");
}

public override Task Run()
{
    loadSensor.StartUpdating(TimeSpan.FromSeconds(2));

    return Task.CompletedTask;
}

public void GetAndDisplayCalibrationUnits(Hx711 sensor)
{   // first notify the user we're starting
    Resolver.Log.Info($"Beginning Calibration. First we'll tare (set a zero).");
    Resolver.Log.Info($"Make sure scale bed is clear. Next step in 5 seconds...");
    Thread.Sleep(5000);
    sensor.Tare();
    Resolver.Log.Info($"Place a known weight on the scale. Next step in 5 seconds...");
    Thread.Sleep(5000);
    var factor = sensor.CalculateCalibrationFactor();
    Resolver.Log.Info($"Your scale's Calibration Factor is: {factor}.  Enter this into the code for future use.");
}

How to Contribute

Need Help?

If you have questions or need assistance, please join the Wilderness Labs community on Slack.

About Meadow

Meadow is a complete IoT platform with defense-grade security that runs full .NET applications on embeddable microcontrollers and Linux single-board computers including Raspberry Pi and NVIDIA Jetson.

Build

Use the full .NET platform and tooling such as Visual Studio and plug-and-play hardware drivers to painlessly build IoT solutions.

Connect

Utilize native support for WiFi, Ethernet, and Cellular connectivity to send sensor data to the Cloud and remotely control your peripherals.

Deploy

Instantly deploy and manage your fleet in the cloud for OTA, health-monitoring, logs, command + control, and enterprise backend integrations.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.2-beta 91 9/13/2026
3.0.1-beta 97 9/9/2026
3.0.0-beta 98 9/4/2026
2.5.0.12-beta 130 4/25/2026
2.5.0.11-beta 125 3/17/2026
2.5.0.10-beta 130 3/11/2026
2.5.0.9-beta 123 3/6/2026
2.5.0.8-beta 127 2/28/2026
2.5.0.7-beta 135 2/27/2026
2.5.0.6-beta 127 2/24/2026
2.5.0.5-beta 222 12/23/2025
2.5.0.4-beta 211 12/20/2025
2.5.0.3-beta 309 12/17/2025
2.5.0.2-beta 465 12/9/2025
2.5.0.1-beta 463 12/9/2025
2.5.0 270 11/24/2025
2.4.0.15-beta 426 11/20/2025
2.4.0.14-beta 161 11/7/2025
2.4.0.13-beta 216 11/6/2025
2.4.0.12-beta 223 11/5/2025
Loading failed