Closed sonic74 closed 4 years ago
Hi!
Initializing lastSmoothedData
in the .h file should not be required as it is being assigned to a value before use (in line 258 of the .cpp file).
I'm not able to replicate an error using setSamplesInUse(1)
, output data is as expected. Could you please provide the complete sketch?
Initializing
lastSmoothedData
in the .h file should not be required as it is being assigned to a value before use (in line 258 of the .cpp file).
Only when calling getData()
before setSamplesInUse()
You're right. I have revised the header file according to your comment, thanks.
Unfortunately, the missing initialisation doesn't seem to have been the culprit. As a workaround I now added refreshDataSet()
after setSamplesInUse()
When doing
I get wrong data. Shouldn't
https://github.com/olkal/HX711_ADC/blob/dff0de8503fdc335e77aef6521881ae8d5b76ae1/src/HX711_ADC.h#L112
be initialized to 0?