#include "HX711.h"
#define DOUT 4
#define CLK 5
HX711 scale;
float calibration_factor = 420; // this calibration factor is adjusted according to my load cell
float units;
void setup()
{
scale.begin(DOUT, CLK);
Serial.begin(9600);
scale.set_scale(calibration_factor); //Adjust to this calibration factor
scale.tare();
}
void loop()
{
units = scale.get_units(), 5;
Serial.print("Weight: ");
Serial.print(units,5); //displays the weight in 4 decimal places only for calibration
Serial.println("grams");
}