# ArduSub firmware for px4-bluerov fail to detect external pressure sensor

**URL:** <https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350>\
**Category:** ArduSub\
**Created:** [June 24, 2016, 8:23am UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350 "2016-06-24T08:23:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![muzakki](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@muzakki](https://discuss.bluerobotics.com/u/muzakki)\
**Post date:** [June 24, 2016, 8:23am UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350/1 "2016-06-24T08:23:04Z")

</div>

&nbsp;

Hi all,

When booting up my px4 that is running the latest ardusub firmware (px4-bluerov), it fails to detect the external pressure sensor (Bar30).

Should I modify any parameters in order to make the px4 read the external rather than the internal pressure sensor?

My question is very similar to the previous forum thread:  
[https://discuss.bluerobotics.com/t/ardusub-not-recognizing-outboard-pressure-sensor/](https://discuss.bluerobotics.com/t/ardusub-not-recognizing-outboard-pressure-sensor/)  
except that my question is targeted at px4 rather than bbb.

Best Regards,  
Andreas

---

<div class="post-metadata">

**Author:** ![muzakki](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@muzakki](https://discuss.bluerobotics.com/u/muzakki)\
**Post date:** [June 25, 2016, 7:04pm UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350/2 "2016-06-25T19:04:44Z")

</div>

In ArduSub/system.cpp I have verified that barometer.num\_instances() returns 1 when booting up the PixHawk.

---

<div class="post-metadata">

**Author:** ![muzakki](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@muzakki](https://discuss.bluerobotics.com/u/muzakki)\
**Post date:** [June 26, 2016, 2:05am UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350/3 "2016-06-26T02:05:47Z")

</div>

Update: I found the error. For some reason, it turns out that if I choose to compile the ArduSub code using Windows tools (as described [http://ardusub.com/developers/#how-to-get-the-code](http://ardusub.com/developers/#how-to-get-the-code)), the SCALED\_PRESSURE2 will not appear in my MAVLink Inspector in QGC. If I compile the exact same code using the Linux method from Ubuntu, the SCALED\_PRESSURE2 appears. This is a bit of a mystery to me.

My next question:  
Will the SCALED\_PRESSURE2 value be available from any of the MAVROS topics?  
When I run:  
$ rostopic echo /mavros/imu/atm\_pressure/fluid\_pressure  
it will echo out the SCALED\_PRESSURE value from the internal barometer of the PixHawk.

---

<div class="post-metadata">

**Author:** ![rjehangir](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/rjehangir/32/671_2.png) [@rjehangir](https://discuss.bluerobotics.com/u/rjehangir)\
**Post date:** [June 26, 2016, 9:50am UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350/4 "2016-06-26T09:50:08Z")

</div>

Hi Andreas,

I’m glad you figured this out but that’s very strange that the build doesn’t work right under Windows. I think everybody working on this code right now is developing in Linux or Mac so we haven’t run into that.

Thanks for finding this. We’ll investigate whatever might cause it. Let us know if you figure it out.

I’m not familiar enough with mavros to know the answer to your question, but since SCALED\_PRESSURE2 is a standard MAVLink message I would guess it is supported or would be easy to add.

-Rusty

---

<div class="post-metadata">

**Author:** ![muzakki](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@muzakki](https://discuss.bluerobotics.com/u/muzakki)\
**Post date:** [June 26, 2016, 6:10pm UTC](https://discuss.bluerobotics.com/t/ardusub-firmware-for-px4-bluerov-fail-to-detect-external-pressure-sensor/350/5 "2016-06-26T18:10:16Z")

</div>

Hi Rusty,

From now on I will stick to the Linux tools :-), but I will let you know if I figure out the problem.  
I have asked the question in the ROS forum instead.

Best Regards,  
Andreas
