Ping1d GPIO connection

Hi
Is it possible to connect the ping1d sonar directly to the GPIOs? Is there any API for this, or have anyone tried?

1 Like

Hi @eirikaso,

Why do you want to connect it to gpio?

While it is definitely possible, the way things are structured is not going to make it easy.

We’re using a upsquared board as companion computer that has has UART on the GPIO, so the plan was to do it directly and having one less component. We also do not have any available USB ports.

Hi @eirikaso,

Yes it’s totally possible, if you want to use it with ping-viewer, you’ll need to create a bidirectional USB-Serial bridge with your /dev/serial_device to allow remote connection with ping-viewer, this can be accomplished with socat, netcat or bridges.

For API, you can use both our python and c++ library for Ping1D.

OK, thanks. So I will not be able to use the ping proxy on the companion? I will need to make my own version of ping proxy?

Hi,

Yes that’s also a possibility.

You can install ping-proxy on your upsquared board, you do not need to make your own. Use the install instructions here: GitHub - bluerobotics/ping-python: Python scripts and examples for the Ping sonar..

But should the ping proxy work with this setup as it is? I’m getting an error trying to launch it but don’t remember exactly what it was

hello, i want to use the GPIO pins on jetson too for this, is there any wiring reference on how to do it on GPIOand use the python library

Hi @axppxsky -
The Ping sonar uses just a simple serial connection. If you don’t want to use a USB adapter for it, you would connect the RX and TX lines of the device to the TX and RX pins of your Jetson - these vary between models of the computer. These instructions may be relevant? Once you have it connected, it’s just a matter of specifying the correct serial port when launching the linked Ping python software (/dev/tty???)

thankyou~!

additional question, although i think its not possible, the 360 sonar needs to be connected through uSB right? theres no other way?

Hi @axppxsky -
The Ping360 has USB, Ethernet, and RS485 for communications. USB is length limited, so Ethernet is the best mix of distance and data rate. Besides those instructions I linked, this guide explains a lot about the types of communications systems use and how to connect them to the Navigator.

1 Like