Open lherreraq2UC opened 3 years ago
Hey guys, I've been using this code, if I comment one of the two objects HX711 (internal or external), the measure works pretty well, I mean, using this by separate ways works, but using both load cells (internal and external) the measure is absolutely wrong.
const int DT = 19; const int SCKL = 18;
HX711 internal; HX711 external;
void setup()
{
Serial.begin(115200);
internal.begin(DT, SCKL); internal.set_gain(128); internal.set_scale(549.0); internal.tare(20);
delay(250);
external.begin(DT, SCKL); external.set_gain(32); external.set_scale(-16631.0); external.tare(20);
} void loop() {
Serial.print("Internal weight: "); Serial.print(internal.get_units(20),3); delay(2000); Serial.println(" gr");
delay(100);
Serial.print(""External weight: "); Serial.print(external.get_units(20),3); delay(2000); Serial.println(" gr");
Serial.println(""); }
Hi guys, I'm using this code to implement one load cell of 1kg in esp32 (channels VSPI), but when I try to use HSPI pins (esp32), the code just doesn't run, so i trying to use both channels of HX711, but i don't know how to do it.
include "HX711.h"
const int LOADCELL_DOUT_PIN = 19; const int LOADCELL_SCK_PIN = 18; HX711 scale;
void setup() { Serial.begin(115200); scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); delay(250);
scale.set_scale(397); scale.tare(10); // Hacer 10 lecturas, el promedio es la tara } void loop() { if (scale.is_ready()) { float reading = scale.get_units(10); Serial.println(String(reading)+" gr"); } else Serial.println("HX711 not found."); delay(500); }