Hello, I'm going to configure it like 4 x 10kg load cell, 4 hx711 amp and esp32-c3-supermini and test it. In the case of amp, the line is complicated, so I'm making it into pcb and experimenting with it.
The circuit diagram at the top left works and the program runs, but the rest of it doesn't work, so I'm having a hard time.
Can you give any advice?
(I will also attach the code and pcb photo.)
//DOUT, SCK
const int HX711_dout1 = 1;
const int HX711_sck1 = 0;
const int HX711_dout2 = 4;
const int HX711_sck2 = 3;
const int HX711_dout3 = 6;
const int HX711_sck3 = 5;
const int HX711_dout4 = 10;
const int HX711_sck4 = 9;
HX711 scale1;
HX711 scale2;
HX711 scale3;
HX711 scale4;
void setup() {
Serial.begin(115200);
delay(1000);
scale1.begin(HX711_dout1, HX711_sck1);
scale2.begin(HX711_dout2, HX711_sck2);
scale3.begin(HX711_dout3, HX711_sck3);
scale4.begin(HX711_dout4, HX711_sck4);
scale1.set_scale(-705.0);
scale2.set_scale(-705.0);
scale3.set_scale(-705.0);
scale4.set_scale(-705.0);
scale1.tare();
scale2.tare();
scale3.tare();
scale4.tare();
Serial.println("All scales tared and ready to measure.");
}
void loop() {
float weight1 = scale1.get_units();
float weight2 = scale2.get_units();
float weight3 = scale3.get_units();
float weight4 = scale4.get_units();
Serial.print("Weight 1: ");
Serial.print(weight1, 2);
Serial.print("Weight 2: ");
Serial.print(weight2, 2);
Serial.print("Weight 3: ");
Serial.print(weight3, 2);
Serial.print("Weight 4: ");
Serial.print(weight4, 2);
delay(1000);
}
`
