/*
#include "HX711.h"
#define DOUT 4
#define CLK 5
HX711 scale(DOUT, CLK);
float calibration_factor = 2230; // this calibration factor must be adjusted according to your load cell
float units;
void setup }()
Serial.begin(9600);
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(calibration_factor); //Adjust to this calibration factor
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);
{
这是代码
no matching function for call to 'HX711::HX711(int, int)'
这是问题
你好,
#include "HX711.h"
#define DOUT 4
#define CLK 5
HX711 scale;
float calibration_factor = 2230; // this calibration factor must be adjusted according to your load cell
float units;
void setup()
{
scale.begin(DOUT, CLK);
...