Reading Multiple Load Cells

Hey guys,

I have an Arduino Uno with 4 load cells attached to the digital pins through the Sparkfun load cell amplifier HX711. The clocks are connected to 2,4,6,8 and the data values are connected to 3,5,7,9. What code do I use to read all of the values from these load cells?

I have the code written for one:

#include <HX711.h>

#define DAT 3
#define CLK 2

HX711 scale(DAT, CLK);

float calibration_factor = -2250;

void setup() {
Serial.begin(9600);
Serial.println(“Load cell 1”);

scale.set_scale(-2250);
scale.tare();

Serial.println(“Reading:”);
}

void loop() {
Serial.print(“Weight: “);
Serial.print(scale.get_units(), 1); //scale.get_units() returns a float
Serial.write(” lbs”); //You can change this to kg but you’ll need to refactor the calibration_factor
Serial.println();
}

What code do I use to read all of the values from these load cells?

Something like what you posted, except with 4 instance of the HX711 class, for each of the 4 clock pins, output pins, and load cells.