#include <HX711.h>
const int ld_cell=23;
const int ld_sck=22;
HX711 scale; // Declare scale here
void setup() {
// Initialize scale here
scale.begin(ld_cell, ld_sck);
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
if(scale.is_ready())
{
scale.set_scale();
Serial.println("tare_remove_weights...");
delay(5000);
scale.tare();
Serial.println("tare done");
Serial.println("now put weight");
delay(5000);
long reading =scale.get_units(10);
Serial.println(reading/419.8);
}
delay(10); // this speeds up the simulation
}