Arduino uno 称重传感器Arduino HX711库未启动
我正试图建立一个20公斤的称重传感器来测试火箭发动机的功率。我正在使用这些步骤来构建它,当我运行balances程序时,它会给我这个错误。是的,我已经安装了图书馆Arduino uno 称重传感器Arduino HX711库未启动,arduino-uno,Arduino Uno,我正试图建立一个20公斤的称重传感器来测试火箭发动机的功率。我正在使用这些步骤来构建它,当我运行balances程序时,它会给我这个错误。是的,我已经安装了图书馆 exit status 1 no matching function for call to 'HX711::HX711(int, int)' 这是代码 /* Calibration sketch for HX711 */ #include "HX711.h" // Library needed to communicate
exit status 1
no matching function for call to 'HX711::HX711(int, int)'
这是代码
/* Calibration sketch for HX711 */
#include "HX711.h" // Library needed to communicate with HX711 https://github.com/bogde/HX711
#define DOUT 6 // Arduino pin 6 connect to HX711 DOUT
#define CLK 5 // Arduino pin 5 connect to HX711 CLK
HX711 scale(DOUT, CLK); // Init of library
void setup() {
Serial.begin(9600);
scale.set_scale(); // Start scale
scale.tare(); // Reset scale to zero
}
void loop() {
float current_weight=scale.get_units(20); // get average of 20 scale readings
float scale_factor=(current_weight/0.145); // divide the result by a known weight
Serial.println(scale_factor); // Print the scale factor to use
}
希望能得到一些帮助,这是网站的链接尝试替换HX711量表(DOUT,CLK)代码>带有
HX711量表编码>然后添加比例。开始(DOUT,CLK)代码>在void setup()的开始处HX711.cpp
在哪里?