新增步进电机方向控制,振动引脚
This commit is contained in:
34
README.md
34
README.md
@ -1,4 +1,32 @@
|
||||
密胺计量程序
|
||||
## 密胺计量
|
||||
[TOC]
|
||||

|
||||
一、接线
|
||||
1、在图:rk3506扩展IO引脚图.png
|
||||
|
||||
配置文件 config.yaml
|
||||
注意配置 network
|
||||
驱动器:rk引脚9接脉冲+,rk引脚19接脉冲-,引脚9对应代码(pin8)。
|
||||
|
||||
振动平台:rk引脚7接振动平台12,rk引脚11接振动平台10,rk引脚11对应代码(pin9)。
|
||||
|
||||
步进电机方向控制:rk引脚17接驱动器方向+,(rk引脚17对应代码pin12),驱动器方向-接rk引脚19。
|
||||
|
||||
二、使用方法:
|
||||
|
||||
1、开启服务:python main.py
|
||||
2、发送称量重量、获取重量、置零 python send_target.py
|
||||
|
||||
三、发送端配置 send_target.py
|
||||
|
||||
cmd_set_target = {
|
||||
# 称量
|
||||
"command": "set_target",
|
||||
"payload": {
|
||||
"target_weight": 200, # 称量的目标重量
|
||||
"algorithm": "pid",
|
||||
"direction_control": False # 控制步进电机的方向 True:给驱动器方向+ 输入高电平
|
||||
}
|
||||
}
|
||||
|
||||
数据返回:
|
||||
{"measuring": false, "error": null, "current_weight": 239, "target_weight": 0, "": "pid", "set_tare": false,
|
||||
"set_tare_num_time": 0, "get_weight": false, "set_vibrate":true, "set_vibrate_time": 30}
|
||||
Reference in New Issue
Block a user