Hi,
I have a Particle Boron which is connected to a sparkfun HX711 to read signals form a load cell. This is the loop code I am using to read the weight from the load cell:
void loop(){
scale.set_scale(calibration_factor); //Adjust to this calibration factor
Serial.print("RAW ");
Serial.print(scale.read());
Serial.print(" one reading:\t");
Serial.println(scale.get_units(), 10);
}
Below is an image of the data sent up the serial port, note the “RAW” (scale.read()); data is either -4900 (which is correct) or is -1 ( which is incorrect). The RAW result seems to be extremely volatile.
I see a similar issue with the scale.get_units(),10);, where -13 is the correct result and I get a random 52. This is less frequent, but just as troublesome. See capture:
I then change the weight on the load cell to give a different output, in the is case -3200, and 9.7 are the correct results, but I still see the bogus results. See Capture2:
I am using the following pins for communication:
HX711ADC scale(A1, A0);
I did not have this problem with arduinos and HX711’s in the past. Does anybody have any advice?