-
Notifications
You must be signed in to change notification settings - Fork 4
/
ABT自定义协议
63 lines (60 loc) · 1.76 KB
/
ABT自定义协议
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
自定义协议部分:
帧头 命令类型 命令编号 Android端 Arduino端
ABT, AR:读取模拟IO量 管脚号 -- 模拟量读数
AW:输出PWM 管脚号 PWM值 --
DR:读取数字IO量 管脚号 -- 数字量读数
DW:输出数字IO量 管脚号 数字量值 --
SR: 读入型传感器模块 传感器编号 -- 传感器值
SW: 控制型传感器模块 传感器编号 控制值 --
帧的结尾以’ #’结束
四轮小车控制:
停止:ABTSW00,0#
前进:ABTSW00,1#
后退:ABTSW00,2#
左转:ABTSW00,3#
右转:ABTSW00,4#
四足小车控制:
停止:ABTSW01,0#
前进:ABTSW01,1#
后退:ABTSW01,2#
左转:ABTSW01,3#
右转:ABTSW01,4#
履带小车控制:
停止:ABTSW02,0#
前进:ABTSW02,1#
后退:ABTSW02,2#
左转:ABTSW02,3#
右转:ABTSW02,4#
左轮增量:
ABTSW05,VAL#(VAL:0-100)
右轮增量:
ABTSW06,VAL#(VAL:0-100)
新增传感器:
1温湿度 单位:℃ ug/m³
温度:ABTSR00,0# 应答:ABTSR00,data#
湿度:ABTSR01,1# 应答:ABTSR01,data#
2 PM2.5 单位:cm
ABTSR02,0# 应答:ABTSR02,data#
3 超声波 单位:cm
ABTSR03,0# 应答:ABTSR03,data#
4 自定义1
ABTSR98,0# 应答:ABTSR98,data#
5自定义2
ABTSR99,0# 应答:ABTSR99,data#
6 甲醛/空气质量 单位:PPM
ABTSR04,0# 应答:ABTSR04,data#
7 设置闹钟小时
ABTSW07,xx#
8 设置闹钟分钟
ABTSW08,xx#
9 设置定时时间(分钟)
ABTSW09,xx#
10 设置定时时间(秒)
ABTSW10,xx#
串口MP3模块:
播放:ABTSW03,0#
停止:ABTSW03,1#
下一曲:ABTSW03,2#
上一曲:ABTSW03,3#
音量+:ABTSW03,4#
音量-:ABTSW03,5#