Ping360 returns None value

Hi, i have a ping360 device and i try to get some data array which i was able to get before using the recommended code below

from brping import Ping360

connect to and initialize device

p = Ping360()
p.connect_serial(’/dev/ttyUSB0’, 115200)
print(f’{p.initialize() = ')

set some settings


get some data, full revolution in steps of 10 gradians (9 degrees)

for gradians in range(0, 400, 10):

but for some reason i get None values this time can you help me with it?
P.S. I’m using jetson Nano and i got the recommended libraries downloaded.Check the usbport with lsusb to see whether my device is recognising the sonar and it is.I dont no what to do next.

This string is missing a closing curly brace, which should be a syntax error. I’d recommend posting code in code blocks in future - see the How to Use the Blue Robotics Forum post for how to do that :slight_smile:

More generally, did the initialisation work? If not, are you sure the device is actually at /dev/ttyUSB0? If initialisation fails then none of the other interactions with the sonar will work either.

Thank you for the code advice I’ll try to do that on further posts.
The code that i posted was from an earlier post and it send me through this forum by you (i suggest you correct that one as well) and i corrected that one but somehow i just forget to correct it again while i was posting this recent post. And i am positive that it is connected to /dev/ttyUSB0 i checked it with lsusb and also got some info via serial.What else can i do?

This was the code from that post, which already has the relevant closing brace. I haven’t edited that since I wrote it, so presumably it was just a copying error :slight_smile:

If you managed to get some info then perhaps the connection is fine? Again, did the initialisation work?

If the device isn’t connecting or initialising as expected, but you know that the port is correct, it may help to

  • ensure you’re using a suitable power supply for the Ping360 (11-25V, >5W capacity)
  • update to the latest version of the library
  • restart the Ping360
  • unplug and re-plug the connection to the Jetson Nano
  • restart the Jetson Nano