Using two Ping sonars with an Arduino

Hi @boroneo, welcome to the forum :slight_smile:

I assume the issue is that you’re using the same transmit pin (TxPin2) for both serial connections?

It’s worth noting that using two acoustic devices at the same time can cause interference. The best approach when using two Ping1Ds is to disable pings of one while you read from the other, then switch which one is enabled :slight_smile:


By the way, I’ve formatted your code in a code block, so it’s easier to read, and can be copied for testing. You can read about how to do that in the Formatting a Post/Comment section of the How to Use the Forums post :slight_smile: