說明:攝像機(jī)是通過UDP協(xié)議進(jìn)行控制,端口號是52381.
命令格式如下:$01\$00\$00\$09\$00\$00\$00\$01\$8X\$01\$06\$01\$VV\$WW\$03\$01\$FF
(X表示攝像頭的編號,VV上下的速度,WW表示左右的速度<0-18>16進(jìn)制)
$表示16進(jìn)制,$8X前的代碼為封裝包,其中的$09表示后面控制代碼的位數(shù)。
最后一個$01為計(jì)數(shù),每發(fā)完一條命令之后,需要重新發(fā)送一條清空命令才能繼續(xù)發(fā)送命令,否則發(fā)送的命令無效。
清空命令是:$02\$00\$00\$01\$00\$00\$00\$00\$01。
示例:
上$01\$00\$00\$09\$00\$00\$00\$01\$81\$01\$06\$01\$18\$17\$03\$01\$FF
下$01\$00\$00\$09\$00\$00\$00\$01\$81\$01\$06\$01\$18\$17\$03\$02\$FF
左$01\$00\$00\$09\$00\$00\$00\$01\$81\$01\$06\$01\$18\$17\$01\$03\$FF
右$01\$00\$00\$09\$00\$00\$00\$01\$81\$01\$06\$01\$18\$17\$02\$03\$FF
停$01\$00\$00\$09\$00\$00\$00\$01\$81\$01\$06\$01\$18\$18\$03\$03\$FF
預(yù)置位存儲:$01\$00\$00\$07\$00\$00\$00\$01\$8X\$01\$04\$3F\$01\$0P\$FF(X表示攝像機(jī)地址位,P表示預(yù)置位號<0-15>)
示例:
1號預(yù)置位存儲:$01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$01\$00\$FF
1號預(yù)置位調(diào)用:$01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$02\$00\$FF
2號預(yù)置位存儲:$01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$01\$01\$FF
2號預(yù)置位調(diào)用:$01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$02\$01\$FF
3號預(yù)置位存儲: $01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$01\$02\$FF
3號預(yù)置位調(diào)用:$01\$00\$00\$07\$00\$00\$00\$01\$81\$01\$04\$3F\$02\$02\$FF