No measurement data using load cells with a combinator and HX711 amplifier

Hello,

I have a problem with measuring load with load cells. I connected them to a combinator board from Sparkfun and reconnected the combinator bord to the HX711 amplifier from Sparkfun.
I've used the following code:

#include "HX711.h"
#define DOUT 3
#define CLK 2

HX711 scale(DOUT, CLK);

float calibration_factor = -7050;
int meting = (scale.get_units(), 1);
int zoemer = 11;
int belastingnorm = -1;

void setup() {
Serial.begin(9600);
pinMode(zoemer, OUTPUT);

scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

Serial.println("Readings:");
}

void loop() {

Serial.print("Reading: ");
Serial.print(scale.get_units(), 1); //scale.get_units() returns a float
Serial.print(" lbs"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.println();
delay(450);
if(meting>belastingnorm) {
digitalWrite(zoemer,HIGH);
}
}

When i open the serial. I get only one number which doesn't change when i put load on the load cells.
I checked the circuit and the loadcells are correctly connected to the combinator board. Do have anyone a solution for this problem so i can measure load?
I detached the circuit i have build.

Greetings Gert

int meting = (scale.get_units(), 1);

Why are you (ab)using the comma operator that way?

Sorry i don't understand what you mean. In the code given in the hookup of the amplifier they use the same command. So i thought that i could get the measurement data with the same command. Sjould i use the digital.read command?

Did you try running the EXACT code as posted on Sparkfun's page? Did it work?

If not, then the problem is your hardware. If it did work, then the problem is the changes you made to the Sparkfun code.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom. :slight_smile: