產品發表 包羅萬象 模型拍賣 綜合討論 直昇機 飛機 同協會 回首頁

台灣遙控模型-RCTW

 找回密碼
 申請
查看: 2124|回復: 3

請教關於 PX4FLOW 聲納的設定

[複製鏈接]
發表於 2017年3月10日 02:43 AM | 顯示全部樓層 |閱讀模式


PX4FLOW 版本是v1.3.1 有聲納版本
使用I2C連接PIXHAWK
聲納設根據這個網站的引導設定
https://www.lambdrive.com/depot/ ... ot/OpticalFlow.html

# Analog=1, I2C=4
RNGFND_TYPE=1
# Analog output on EZ4 is linear
RNGFND_FUNCTION=0

# Analog input pin on ADC 6.6V socket is mapped to virtual pin 15.
# If you've connected the sonar to ADC 3.3V socket (using voltage converter), it will either be virtual pin 13 or 14 (ADC 3.3V socket has 2 analog input pins combined).
RNGFND_PIN=15

# EZ4 is linear and ratiometric
RNGFND_FUNCTION=0
RNGFND_RMETRIC=1

# Don't connect stop pin (sonar will always be on)
RNGFND_STOP_PIN=-1

# The wiki says you should set this to 7m for EZ0 and EZ4, but that's for XL-MaxSonar series. HRLV-Max-Sonar-EZ4 on PX4FLOW only mesures up to 5m.
RNGFND_MAX_CM=500
# EZ4 on PX4FLOW won't return reliable data if the distance is closer than 30cm.
RNGFND_MIN_CM=30

# Adjust the following according to the description given by Paul Riseborough below.
# http://diydrones.com/forum/topic ... 3AComment%3A2137979

# Distance in cm of the PX4FLOW unit from the ground.
RNGFND_GNDCLEAR=2
# In theory, the voltage range should be between 0.293V and 4.885V (300mm to 5000mm) when Vcc = 5V for the EZ4 sonar on PX4FLOW.
RNGFND_OFFSET=0.293
# Acroding to the datasheet, EZ4 will return 4.885V at 5m when given 5V Vcc.
# 5m / 4.885v
RNGFND_SCALING=1.02354


設定完後聲納的電壓跟距離都是0沒有任何反應
請問前輩們我是在哪一步驟有錯誤?
謝謝!




上一篇:「御」風而行的空中舞者 - DJI Mavic 基本設定篇
下一篇:Parrot Bebop + Skycontroller 四軸高清 空拍機問題請教
發表於 2017年3月18日 09:15 AM | 顯示全部樓層
PX4FLOW 1.3.1 上面的聲納是給光流使用的,不會提供資料給 PIX ..
我個人是把聲納的ADC引腳獨立拉出給PIX使用(我的聲納是 ADC版本)..
後期是用一塊arduino mini 把 ADC轉成I2C,就可以回傳給PIX了..

點評

給星星: 5.0
給星星: 5
  發表於 2017年4月5日 09:35 PM
給星星: 5
多谢这位大大的回复与分享。这个解决方法看起来很不错。等我的pixhawk到手了就实验。  發表於 2017年3月19日 10:14 AM
您需要登錄後才可以回帖 登錄 | 申請

本版積分規則

世界各國訪RCTW統計

手機版|台灣遙控模型-RCTW

GMT+8, 2024年4月24日 10:12 AM

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回復 返回頂部 返回列表