Any,
It looks like the example sketch is only setting the parameter values for the first sonar. I think maybe if you duplicate those three parameter related lines but add a "2" to the param name it might work?
https://github.com/diydrones/ardupilot/blob/master/libraries/AP_RangeFinder/examples/RFIND_test/RFIND_test.cpp#L19
I'd check the RangeFinder.CPP to be sure to get the param name correct.
https://github.com/diydrones/ardupilot/blob/master/libraries/AP_RangeFinder/RangeFinder.cpp#L129
--Randy
--------------------------------------------
On Mon, 2/22/16, Anh Hoang Cong <
anh....@gmail.com> wrote:
Subject: [drones-discuss] Using 2 sonar sensors on PX4 Board
To: "drones-discuss" <
drones-...@googlegroups.com>
Date: Monday, February 22, 2016, 11:52 AM
Hi
This is Anh from Korea
Currently, I am working on a Drone project which use 2 sonar
sensors for
applying obstacle avoidance on Drone
My idea is connect these sensors to PX4 via i2c port on Px4,
I have setup
the 2 new addresses (0x70 and 0x6F ) for 2 Maxbotic sonar
sensors
I ran the example in *AP_RangerFinder/examples/RFIND_test*,
but i only
received distance data from* 1 sensor* (please see the
attached file).
I think this problem happens because there is only *1
default address*
(0x70) is fixed in* /PX4Firmware/src/drivers/mb12xx* :
#define
MB12XX_BASEADDR 0x70
(I tried to change to 0x6F and it only worked on the 0x6F
sensor,ad ignored
0x70 sensor)
Is there anyone who know about this problem, could you
please give me some
advice?
Thank you for you time.
Regard,
Anh
--
You received this message because you are subscribed to the
Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
drones-discus...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.