单片机的程序代码:/* sample for digital weight scale of hx711, display with a HD44780 liquid crtstal monitor
*
* hardware design: syyyd
* available at http://syyyd.taobao.com
*
* library design: Weihong Guan (@aguegu)
* http://aguegu.net
*
* library host on
* https://github.com/aguegu/Arduino
*/
// Hx711.DOUT - pin #A1
// Hx711.SCK - pin #A0
#include <Hx711.h>
Hx711 scale(A1, A0);
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(scale.getValue(), 1);
}
[hr]
在这里上传我的代码程序和hx711的库文件:
*
* hardware design: syyyd
* available at http://syyyd.taobao.com
*
* library design: Weihong Guan (@aguegu)
* http://aguegu.net
*
* library host on
* https://github.com/aguegu/Arduino
*/
// Hx711.DOUT - pin #A1
// Hx711.SCK - pin #A0
#include <Hx711.h>
Hx711 scale(A1, A0);
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(scale.getValue(), 1);
}
[hr]
在这里上传我的代码程序和hx711的库文件:
200字以内,仅用于支线交流,主线讨论请采用回复功能。