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