Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 45999

TFmini plus ,avoidance and arduino

$
0
0

@Slyv06 wrote:

HI there,

I’m new to this community even if I have already spent many hours reading :slight_smile:

I’m trying to feed my copter with 4 distance messages mesured from 4 TFMini plus sensors configured to work with I2C.
I didn’t find any way to configure multiple I2C lidar sensors (each one in a different direction) neither a driver compliant with arducopter, so I imagined the workaround: An arduino (or teensy) connected to a pixhawk telemetry port.

=> The arduino collects the TFmini plus values on the I2C bus ( DONE ! I can plot the 4 distances on the I2C bus. I can give the code if someone is interested)

=>The arduino sends msg_distance_sensor to the FC
( http://ardupilot.org/dev/docs/code-overview-object-avoidance.html, “any sensor capable of providing distances using the MAVLink [DISTANCE_SENSOR] message”)

=> MissionPlanner should display the distances in the RADAR type window

I have integrated the mavlink 2 library to the arduino project:
- “https://mavlink.io/en/messages/common.html#DISTANCE_SENSOR” provides the data structure to be filled
- the “mavlink_msg_distance_sensor_pack” function and “mavlink_msg_to_send_buffer” should allow to send what I need to send.

I have validated I can receive telemetry from the FC to the arduino, but is there a way to log if my messages are correctly received by the FC? (RADAR window don’t display anything :frowning: )

Thanks for your help!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 45999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>