Maybe someone here can get to the bottom of this. I am experiencing the same problem for months now. I have put a bandage ever the problem with a median calculation, but I am unhappy with the bug. I have tested the code I am using separately on an Arduino Uno and I get perfect results. Once I replace the Arduino with my Boron, the bug emerges.
For anyone experienced with the HX711 library, I have made an observation which may point towards the problem: The time it takes to take the reading increases while reporting a bogus data point. Please see the attached image.
This Output was regenerated using this short Code:
#include <HX711ADC.h>
#define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch
#define DOUT 3
#define CLK 2
HX711ADC scale;
long time1 = 0;
void setup() {
Serial.begin(9600);
Serial.println("HX711 scale demo");
scale.begin(DOUT, CLK);
scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0
Serial.println("Readings:");
}
void loop() {
time1 = millis();
Serial.print(" Reading: ");
Serial.print(scale.get_units(), 1); //scale.get_units() returns a float
Serial.print(" kg Time to take reading = "); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.print(millis() - time1);
Serial.println();
}
Can anyone give me a few suggestions as to how to address this?
Thanks.