64 hx711Sensor.setTareOffset(tareOffset);
65 uint64_t stabilizingTime = 2000;
67 hx711Sensor.start(stabilizingTime, _tare);
68 if (hx711Sensor.getTareTimeoutFlag()) {
69 SUPLA_LOG_DEBUG(
"HX711 timeout, check connection");
71 calFactor = (calValue > 0) ? calValue : defCalValue;
72 hx711Sensor.setCalFactor(calFactor);
73 SUPLA_LOG_DEBUG(
"HX711 startup is complete");
75 uint32_t wait = millis();
76 while (!hx711Sensor.update() && millis() - wait <= 100) {}
77 SUPLA_LOG_INFO(
"HX711 calibration value: %.2f", hx711Sensor.getCalFactor());
79 "HX711 measured conversion time ms: %.2f",
80 hx711Sensor.getConversionTime());
82 "HX711 measured sampling rate: %.2f HZ", hx711Sensor.getSPS());
84 "HX711 measured settling time ms: %d", hx711Sensor.getSettlingTime());
85 channel.setNewValue(getValue());