#include "HX711.h" HX711 scale; float callibration_factor = 2280.f; void setup() { Serial.begin(38400); Serial.println("HX711 Demo"); Serial.println("Initializing the scale"); scale.begin(A1, A0); reading_value(); scale.set_scale(callibration_factor); // callibration factor can be called as the multiplication factor of amplification of the voltage scale.tare(); // reset the scale to 0 Serial.println("After setting up the scale:"); Serial.print("read: \t\t"); reading_value(); } void loop() { Serial.print("one reading:\t"); Serial.print(scale.get_units(), 1); Serial.print("\t| average:\t"); Serial.println(scale.get_units(10), 1); scale.power_down(); // put the ADC in sleep mode delay(5000); scale.power_up(); } void reading_value() { Serial.println(scale.read()); // print a raw reading from the ADC Serial.print("read average: \t\t"); Serial.println(scale.read_average(20)); // print the average of 20 readings from the ADC Serial.print("get units: \t\t"); Serial.println(scale.get_units(5), 1); // print the average of 5 readings from the ADC minus tare weight (not set) divided }