#include <HX711.h>
#include <TinyDebug.h>

#define DATA_PIN  1
#define CLOCK_PIN 2

HX711 hx711;

volatile float units;

void setup() {
  Debug.begin();
  hx711.begin(DATA_PIN, CLOCK_PIN);

  // Efetua a leitura e calcula a escala
  // long average = hx711.read_average(50);
  // float scale = ((average - hx711.get_offset()) / 1.00f);

  // Define com a escala calculada
  hx711.set_scale(420.0983);
  hx711.tare();
}

void loop() {
  units = hx711.get_units();
  Debug.println(units);
  delay(200);
}