標(biāo)題: arduino 電子秤 [打印本頁]

作者: 美琴的備胎    時間: 2021-4-25 10:36
標(biāo)題: arduino 電子秤
#include "HX711.h"
int Weight = 0;

void setup()
{
    Init_Hx711();                //初始化HX711模塊連接的IO設(shè)置

    Serial.begin(9600);
    Serial.print("Welcome to use!\n");

        Get_Maopi();        //獲取毛皮
    delay(3000);
    Get_Maopi();        //獲取毛皮
}

void loop()
{
    Weight = Get_Weight();    //計算放在傳感器上的重物重量
    Serial.print(Weight);    //串口顯示重量
    Serial.print(" g\n");    //顯示單位
    delay(1000);        //延時1s

}

3.37 電子秤實驗.zip

2.76 KB, 下載次數(shù): 7, 下載積分: 黑幣 -5


作者: litxyz    時間: 2021-5-20 02:16
精度是多少?




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1