//#include "HX711-multi.h"
#include "HX711.h"
#define calibration_factor -700.0 //This value is obtained using the SparkFun_HX711_Calibration sketch
#define DOUT3 7
#define CLK3 6
#define DOUT2 5
#define CLK2 4
#define DOUT1 3
#define CLK1 2
HX711 scale1;
HX711 scale2;
HX711 scale3;
float calibration_factor1 = 47.6275; //pre 200kg
float calibration_factor2 = 47.6275; //
float calibration_factor3 = 47.6275; //
int p;
void setup() {
Serial.begin(9600);
Serial.println("HX711 scale1 demo");
scale1.begin(DOUT1, CLK1);
scale1.set_scale();
scale2.begin(DOUT2, CLK2);
scale2.set_scale();
scale3.begin(DOUT3, CLK3);
scale3.set_scale();
scale1.set_scale(calibration_factor1); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale2.set_scale(calibration_factor2); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale3.set_scale(calibration_factor3); //This value is obtained by using the SparkFun_HX711_Calibration sketch
//scale1.tare(); //Assuming there is no weight on the scale1 at start up, reset the scale1 to 0
//scale2.tare(); //Assuming there is no weight on the scale1 at start up, reset the scale1 to 0
//scale3.tare(); //Assuming there is no weight on the scale1 at start up, reset the scale1 to 0
}
void loop() {
Serial.print("Reading 1: ");
Serial.print(scale1.get_units() / 2.20462, 1); //scale1.get_units() returns a float
Serial.print(" Kgs"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.print(" ");
Serial.print("Reading 2: ");
Serial.print(scale2.get_units() / 2.20462, 1); //scale3.get_units() returns a float
Serial.print(" Kgs"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.print(" ");
Serial.print("Vaha 3: ");
Serial.print(scale3.get_units() / 2.20462, 1); //scale3.get_units() returns a float
Serial.print(" Kgs"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.println();
}