# Rasberry Pi and ArduSub/Pixhawk Interface

**URL:** <https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240>\
**Category:** Blue Robotics Software\
**Tags:** ardusub\
**Created:** [October 25, 2019, 4:05pm UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240 "2019-10-25T16:05:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmangelson](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jmangelson](https://discuss.bluerobotics.com/u/jmangelson)\
**Post date:** [October 25, 2019, 4:05pm UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240/1 "2019-10-25T16:05:37Z")

</div>

Hi,

Where can I find more information about the PyMavLink interface between the Rasberry Pi and ArduSub. I’m building an AUV based on the BlueROV Heavy with several modifications and additional sensors.

What data can be sent between the Rasberry Pi and ArduSub on the Pixhawk?

I want to be able to get regular access to the sensor measurements for the sensors directly  
connected to the pixhawk.

I also want to be able to send commands from the Rasberry Pi to the Pixhawk including:

- Low Level Thruster Commands
- High Level Commands such as commanded pitch/roll, velocity
- Potentially waypoints

Is this possible?  
Where can I find more information about this?

Also, with what frequency can I get updates from the sensors connected to the Pixhawk over the  
connection to the Rasberry Pi?

Lastly, how is time synchronisation handled between the RPi and the Pixhawk?

Thanks,

Josh

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [October 26, 2019, 12:35am UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240/2 "2019-10-26T00:35:57Z")

</div>

Hi,

Please check our pymavlink documentation here: [Pymavlink · GitBook](https://www.ardusub.com/developers/pymavlink.html)

Each message contains a timestamp, if you want to change the frequency of a specific message, please take a look in [MAV\_CMD\_SET\_MESSAGE\_INTERVAL](https://mavlink.io/en/messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL)

---

<div class="post-metadata">

**Author:** ![jmangelson](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jmangelson](https://discuss.bluerobotics.com/u/jmangelson)\
**Post date:** [October 26, 2019, 4:24am UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240/3 "2019-10-26T04:24:11Z")

</div>

Hi Thanks!

I saw the first link you sent, but hadn’t seen the second.

However, can you give me more information about how to sync the pixhawk time to the RPi time? I need time stamps generated from either system to be aligned. This is usually done via something like ntp or ptp or a pps signal interface.

Thanks!

Josh

---

<div class="post-metadata">

**Author:** ![jmangelson](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jmangelson](https://discuss.bluerobotics.com/u/jmangelson)\
**Post date:** [October 26, 2019, 4:25am UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240/4 "2019-10-26T04:25:45Z")

</div>

Additionally, what specific information can be sent from the poxhawk to the pi?

Can battery sensing information be sent?

Thanks!

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [October 27, 2019, 2:55pm UTC](https://discuss.bluerobotics.com/t/rasberry-pi-and-ardusub-pixhawk-interface/6240/5 "2019-10-27T14:55:46Z")

</div>

> [@jmangelson](#):
>
> can you give me more information about how to sync the pixhawk time to the RPi time?

Take a look in the ardupilot website about message synchronization: [Clock/Time Synchronisation — Dev documentation](http://ardupilot.org/dev/docs/ros-timesync.html)

This is ROS specific but the same thing can be applied for any application, some modifications in ardusub may be necessary to accomplish what you looking for.

> [@jmangelson](#):
>
> Additionally, what specific information can be sent from the poxhawk to the pi?
> 
> Can battery sensing information be sent?

Take a look in the mavlink website: [Messages (common) · MAVLink Developer Guide](https://mavlink.io/en/messages/common.html)  
You can use the search bar or ctrl+f to find specific messages.
