文号
939578
阅读
1359
回复
0
收藏
2
系列第(1)采用HX711模块的试车台高速采集代码
2024/11/19
原创
IP:福建

以后会慢慢跟新一套适合新手的模型火箭全套系统制作教程

代码是如下:

#include <DFRobot_HX711_I2C.h>

// 动态变量
volatile float mind_n_m, mind_n_w;

// 创建对象
DFRobot_HX711_I2C MyScale(&Wire, 0x64);

// 主程序开始
void setup() {
Serial.begin(115200);
mind_n_m = 0;
while (!MyScale.begin());
for (int index = 0; index < 200; index++) {
mind_n_w = (MyScale.readWeight());
if ((mind_n_w>mind_n_m)) {
mind_n_m = mind_n_w;
}
Serial.print(mind_n_w);
Serial.print(",");
Serial.println(mind_n_m);
}
}
void loop() {

}

有需要的拿走,但其中的主控要求是aduno,如果没有私信(一共送3块)

其中Serial.begin(115200);

是采集速录调整

while (!MyScale.begin());

中的括号

是采集平均

数值越大采集月满

不填或为1为最快,及原始数据

[ 修改于1年11个月前 - 2024/11/20 12:18:50 ]
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的