ArduinoArduino UnoExact chip

Scale (HX711)

A load cell through an HX711: tared at start, then grams. Set the weight.

Scale (HX711) in Argynix Lab

The code

sketch.inoC++
// A load cell through an HX711: tared at start, then read in grams.
// Select the load cell to put a weight on it.
#include <HX711.h>

HX711 scale;

void setup() {
  Serial.begin(9600);
  scale.begin(3, 2);
  scale.set_scale(420);
  scale.tare(5);
  Serial.println("Tared");
}

void loop() {
  Serial.print("grams:");
  Serial.println(scale.get_units(3), 0);
  delay(250);
}