這是代碼
#include"HX711.h"
float Weight = 0.0;
//#define HX711_SCK 13
//#define HX711_DT 10
void setup() {
Serial.begin(9600);
Init_Hx711();
Get_Maopi(); //clear the weight
delay(3000);
}
void loop() {
Weight = Get_Weight();
Serial.print("Weight = ");
Serial.print(Weight*2); //the true weight
Serial.println(" g");
delay(1000);
}
還有庫檔案代碼。


uj5u.com熱心網友回復:
兄弟庫檔案能給發一個嗎轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/39139.html
標籤:單片機/工控
下一篇:stc89c51
