Thanks Langue,
I ended up removing the libraries I had and downloaded the ones from your links above.
I’ve been mucking around for a couple of hours and not getting anywhere.
I’ve opened the supplied HX711_Calibration code, uploaded it, ran it and don’t get any readings, well I mean I get zero. Seems a bit odd not to get something.
I get:
Reading: 0.00 kg calibration_factor: -7050.00
I’m aware that the calibration_factor is the one that needs changing to suit MY load cell, and the number does change when using the + or - keys, but the reading doesn’t.
With the original firmware I was at least able to tare and calibrate and get a reading, albeit not in the exact format I wanted.
It was sort of close - for a weight of 353 grams I was getting 3.53 kilos formatted as:
3.53,kg,
I thought if I could multiply the reading by 100, remove the decimal point, commas and the text kg, then I would end up with what I need:
353 (grams is assumed)
This is the Calibration code and uses steps similar what you posted above. I thought I would start with that, then modify it.
[code]*/
#include “HX711.h”
#define DOUT 3
#define CLK 2
HX711 scale(DOUT, CLK);
float calibration_factor = -7050; //-7050 worked for my (HIS) 440lb max scale setup
void setup() {
Serial.begin(115200);
Serial.println(“HX711 calibration sketch”);
Serial.println(“Remove all weight from scale”);
Serial.println(“After readings begin, place known weight on scale”);
Serial.println(“Press + or a to increase calibration factor”);
Serial.println(“Press - or z to decrease calibration factor”);
scale.set_scale();
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average(); //Get a baseline reading
Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
Serial.println(zero_factor);
}
void loop() {
scale.set_scale(calibration_factor); //Adjust to this calibration factor
Serial.print(“Reading: “);
Serial.print(scale.get_units(), 1);
Serial.print(” kg”); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
Serial.print(" calibration_factor: ");
Serial.print(calibration_factor);
Serial.println();
if(Serial.available())
{
char temp = Serial.read();
if(temp == ‘+’ || temp == ‘a’)
calibration_factor += 10;
else if(temp == ‘-’ || temp == ‘z’)
calibration_factor -= 10;
}
}[/code]
I would have thought it should work.
Maybe I’ve got an older or new version of the HX711 library?