UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.35k stars 420 forks source link

HX711: Calibration factor (float required) #588

Closed omani closed 7 months ago

omani commented 7 months ago

The issue

the hx711 component is using int32_t for all readings from the scale.

how can I use floating points when dealing with calibration where I have to set a calibration factor to calibrate eg. 1kg?

I see other hx711 implementations out there using longs, floats, doubles, etc.

is it possible to convert int32_t to float? and why does ESP_LOGI not print any float numbers?

Which SDK are you using?

ESP8266 RTOS SDK

Which version of SDK are you using?

master

Which build target have you used?

Component causing the issue

hx711

Anything in the logs that might be useful for us?

No response

Additional information or context

No response

Confirmation

omani commented 7 months ago

nvm this was a problem on my side.