#include "HX711.h"
// https://randomnerdtutorials.com/esp32-load-cell-hx711/
HX711 scale;
#define CALIBRATION_FACTOR 928 / 2.21 // (reading)/(known weight)
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-C3!");
Serial.println("Initializing the scale");
scale.begin(A1, A0);
scale.set_scale(CALIBRATION_FACTOR); // this value is obtained by calibrating the scale with known weights; see the README for details
//scale.tare(); // reset the scale to 0
}
void loop() {
Serial.print("read: \t\t");
Serial.println(scale.read());
Serial.print(scale.get_units(), 1);
Serial.println("kg");
delay(1000);
}