Scale with two load cells

Hello everyone, how are you? I'm working on a project for a scale using two load cells, each with a capacity of 50kg. I managed to set up the connections and collect data, but one load cell is reading positive values while the other is reading negative values. Is there a way to adjust this within the code?

image

I connected both white wires to the E+ input, both black wires to the E-, and one red wire to the A+ input, and the other to the A-

'#include <HX711.h>
#define DOUT 4
#define CLK 2

HX711 scale;
float calibration_factor = 42130;

void setup()
{
Serial.begin(9600);
scale.begin(DOUT, CLK);
Serial.println("Scale with HX711");
Serial.println("Press T to tare the scale");
scale.set_scale(calibration_factor);
scale.tare();
}
void loop()
{
Serial.print("Weight: ");
Serial.print(scale.get_units(), 2);
Serial.println(" kg");
delay(500) ;

if (Serial.available())
{
char temp = Serial.read();
if (temp == 't' || temp == 'T')
{
scale.tare();
Serial.println(" Scale tare");
}
}
}

No, you need to switch the white and black wires on one of the laod cells

I tried reversing the white wires with the black ones; however, when I do that, the load cell that was reading positive values starts reading negative, and the other one that was reading negative starts reading positive. Inverting the red wires as well gives me the same result.

Connect the black of one cell to the white of the other.
Don't connect black to black and white to white

I apologize, but I think I now understand that you meant only one, I had swapped both. I'll try to redo the soldering, and I'll let you know if it worked.

That worked! Thank you so much for your help. It was a simple thing that I hadn't noticed.

Simple but not so obvious.

Have a nice day