# "Ping device failed to initialise" using ping-arduino

**URL:** <https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352>\
**Category:** Ping Sonar Devices\
**Tags:** ping\
**Created:** [March 26, 2021, 11:21am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352 "2021-03-26T11:21:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![berk](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@berk](https://discuss.bluerobotics.com/u/berk)\
**Post date:** [March 26, 2021, 11:21am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/1 "2021-03-26T11:21:22Z")

</div>

Hello, when i use pingviewer i can get the correct data from my Ping sonar but as stated in the title, when i try to read data trough serial monitor on Arduino IDE, it shows that sonar is not being initiliazed.I checked the pin connections and everything seems to be correct.Is there anyway i can fix this problem?

The link i used to set the connections;

> **[Using the Ping Sonar with an Arduino](https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/)**
>
> This guide teaches you how to connect the Ping Echosounder sonar with an Arduino to measure distances underwater. It can be used the make a basic fishfinder, boat depth sensor, and for ROV and robotics projects.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 15, 2021, 12:30am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/2 "2021-07-15T00:30:50Z")

</div>

Hi @berk,

I just found this while responding to another thread (merged below). Did this end up getting solved? 🙂

---

<div class="post-metadata">

**Author:** ![Josh1977](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josh1977](https://discuss.bluerobotics.com/u/Josh1977)\
**Post date:** [July 14, 2021, 8:40am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/3 "2021-07-14T08:40:00Z")

</div>

Dear all,

I just received a ping sonar and cannot wait to hook it up with Arduino Uno.  
However, it keeps sending me “Ping device failed to initialize”.  
All the connections and software are the same as  
[https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/](https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/).

Can anyone help me with this issue?

Thank you very much.

Josh

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 15, 2021, 12:25am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/4 "2021-07-15T00:25:30Z")

</div>

Hi @Josh1977, welcome to the forum! 🙂

> [@Josh1977](#):
>
> it keeps sending me “Ping device failed to initialize”.

This is usually caused by having the RX and TX wires the wrong way around, or from the serial baud-rate being incorrect between the Arduino and the Ping device. Can you confirm which Ping1D firmware version you’re using? It’s possible our guide and/or code are outdated - I’ve asked internally and am trying to find out what the latest information should be.

In [this recent thread](https://discuss.bluerobotics.com/t/ping-sonar-and-recent-firmware-v3-28/9866) I connected successfully to our latest firmware (`Ping-v3.28_auto`) by changing the baud rate from 9600 to 115200 (e.g. change from `pingSerial.begin(9600)` to `pingSerial.begin(115200)`), which you may wish to try. Otherwise you should be able to roll back your firmware to `Ping-v3.27_9600` using PingViewer (as specified in the guide you linked to), after which the example code should work as-is assuming your wires are connected to the correct ports.

---

<div class="post-metadata">

**Author:** ![Josh1977](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josh1977](https://discuss.bluerobotics.com/u/Josh1977)\
**Post date:** [July 15, 2021, 1:18am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/5 "2021-07-15T01:18:46Z")

</div>

Thank you very much. I just change “pingSerial.begin(9600)” to “pingSerial.begin(115200)” and it works. Please update your download version from the website. Its example still writes 9600. Thank you very much for your wonderful product.

Looking forward to obtaining more products from your company.

Best regards,

Josh

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 20, 2021, 7:14am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/6 "2021-07-20T07:14:47Z")

</div>

@Josh1977

I’ve spoken with our software team and apparently the reasoning for using 9600 baud is that Arduino Software Serial can have issues going much faster than that, especially when there’s much other code running. We’re planning to update our Arduino examples to work correctly with our latest `Ping_V3.28_auto.hex` firmware (enabling both 9600 and 115200 baud without needing to change firmware), and change our documentation to say that 115200 baud is possible, but not recommended unless on Hardware Serial.

See the following GitHub Issue for progress:

> <https://github.com/bluerobotics/ping-arduino/issues/29>
>
> Currently this library doesn't support our latest firmware (\`Ping\_V3.28\_auto.hex…\`), so users wanting to use Software serial generally need to downgrade their firmware to get it working, or use 115200 baud at the risk of communication reliability issues.
> 
> \- \[x\] @patrickelectric has mentioned it should just require sending alternating \`10101010...\` for a while on startup, if the baud isn't 115200. Not sure if this only handles 9600 or if it's also possible to use other bauds in between. 
> 
> \- \[x\] If production doesn't already flash and ship with 3.28 then that should be changed.
> 
> This should reduce issues like #27 and #19, and other similar problems from people not reading or understanding our \[Ping with Arduino guide\](https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/#change-the-baudrate-to-9600).
> 
> \- \[x\] Once this is complete we should update that guide and our example code and docs to be more clear that 9600 baud is \_recommended\_ for Software Serial, and other bauds are possible but "at user's risk", unless using Hardware Serial, in which case 115200 should work without issues.

In the meantime, if 115200 is working without issues for you then you’re welcome to continue using it, but if it is having some problems then I’d recommend either

1. changing to an Arduino with additional hardware serial ports (e.g. Arduino Mega), and using hardware serial instead of software serial OR
2. connecting your Ping to your computer via a [BLUART](https://bluerobotics.com/store/comm-control-power/tether-interface/bluart-r1-rp/) (or some other USB to TTL Serial converter), and [updating the firmware](https://docs.bluerobotics.com/ping-viewer/firmware-update) to `Ping_V3.27_9600b.hex`, after which you should be able to use 9600 baud software serial in your Arduino script. (Detailed instructions with screenshots [here](https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/#change-the-baudrate-to-9600))

---

<div class="post-metadata">

**Author:** ![Josh1977](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josh1977](https://discuss.bluerobotics.com/u/Josh1977)\
**Post date:** [July 20, 2021, 7:31am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/7 "2021-07-20T07:31:22Z")

</div>

Thank you very much for your email.  
Sorry to bother you again. Is there a document to describe how to update the firmware?

Once again, thank you for your help.

Best regards,

Josh

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 20, 2021, 7:36am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/8 "2021-07-20T07:36:09Z")

</div>

> [@Josh1977](#):
>
> Is there a document to describe how to update the firmware?

My previous comment has a link to our firmware updating documentation:

> [@EliotBR](#):
>
> 1. connecting your Ping to your computer via a [BLUART](https://bluerobotics.com/store/comm-control-power/tether-interface/bluart-r1-rp/) (or some other USB to TTL Serial converter), and [updating the firmware](https://docs.bluerobotics.com/ping-viewer/firmware-update) to `Ping_V3.27_9600b.hex` , after which you should be able to use 9600 baud software serial in your Arduino script.

and it’s also covered with pictures and steps in our [Using the Ping Sonar with an Arduino](https://bluerobotics.com/learn/using-the-ping-sonar-with-an-arduino/#change-the-baudrate-to-9600) guide 🙂

---

<div class="post-metadata">

**Author:** ![Josh1977](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josh1977](https://discuss.bluerobotics.com/u/Josh1977)\
**Post date:** [July 20, 2021, 7:49am UTC](https://discuss.bluerobotics.com/t/ping-device-failed-to-initialise-using-ping-arduino/9352/9 "2021-07-20T07:49:57Z")

</div>

Wonderful and appreciate it.

Best regards,

Josh
