GrovePi, stuck when using python

Hello,
I installed Raspbian for Robots on my Pi3, pluged the GrovePi Ultrasonic distance sensor :

but the python script is stuck, and when I launch the GrovePi troubleshooting, I get this :

Thank for your time

1 Like

1 Like

1 Like

Update :
Now I’m using the c++ version, grovepi_us_read.cpp

Now it returns a random value over and over evey time I launch it,
like : [pin 4][ultrasonic read = 43877 cm]

thanks

1 Like

Please use Python3. There seems to be an issue with Python2. Are you running Buster?

1 Like

no, Raspbian for Robots
I’m not using python anymore
Now I’m using the c++ version, grovepi_us_read.cpp

Now it returns a random value over and over evey time I launch it,
like : [pin 4][ultrasonic read = 43877 cm]

1 Like

I’m not using python anymore

1 Like

Just my two cents here, but have you tried using the serial services/libraries with something else? - like maybe a serial display module or something?

As far as I can tell, reading the thread as it is, I don’t know if you are having a problem with the sensor or the serial port?

If I were doing this, I’d stop using the sensor, and then try something else on the same port, perhaps a serial display module, to see if the serial port itself is working.

Thanks!

I just tried the grovepi_us_read.cpp code and it works fine over here. (of course it would)

Did you ever get a proper output from sudo i2cdetect -y 1 ? cause if that fails, everything else will fail too

Also, I fixed an issue with installation moments ago, so you may want to re-install, if the i2cdetect still fails for you.

Cleo

1 Like