UltrasonicRead Problem with Pi3

Hi @basketball4-ever,

Can you post a video of the setup with ultrasonic sensor and the output that you see. When you take a video make sure, there aren’t any stationary obstacles before the ultrasonic sensor and also observe what happens to the readings when a obstacle is brought close to ultrasonic sensor. Can you also tell if the ultrasonic sensor alone is working good.

-Shoban

hi @Shoban

There is no change in the output of the sensor when i bring an object closer to it.
How can i test if the sensor alone is “working good”? I don’t have any special equipment…

Hi @basketball4-ever,

Can you post a video of how you are using the sensor and with the output that you see on the screen.Also can you tell us from where you bought your starter kit.

-Shoban

hi @Shoban

here is the video:
video.avi (2.7 MB)

here is the output:
output.txt (992 Bytes)

I bought the starter kit from here:
https://www.pi-shop.ch/grovepi-starter-kit-fuer-raspberry-pi

-basketball4-ever

Hi @basketball4-ever,

Can you send us video of different format or through different means like youtube links, Its not getting downloaded for us.

Thanks a lot for your patience, we will to try to help you the best possible.

-Shoban

hi @Shoban

I will try later, sorry. The video isn’t really special, you could see the pi3 with the grovePi board and only the ultrasonic sensor attached and my hand moving closer and further from the sensor…

-basketball4-ever

Hi @basketball4-ever,

Sorry for the delay in reply, as part of the last test can you have the Ultrasonic sensor alone connected to Port D4 of GrovePi and run this example. In this example add a line with time.sleep(1) after Line 46.

We are not sure if this is a sensor problem and the problem looks more like an issue with the connections, sensor pinout or interference with another sensor.

-Shoban

Hi @Shoban,
Unfortunately this doesn’t solve the problem.

I restartet today once again, took your newest raspbian for robots image, then got only an error as output. And after running pi3.sh it was the same error as described…

-basketball4-ever

@basketball4-ever,
Can you give us a few more details from the last post.

took your newest raspbian for robots image, then got only an error as output

Can you send us a screenshot of the program you had tried and the error you got.

after running pi3.sh it was the same error as described

Can you send us a link to pi3.sh and what it does

hi @karan

i downloaded the 2017.02.17_Dexter_Industries_Jessie.zip and followed this instruction.

after that the grove_ultrasonic.py example (with the insert of the time.sleep(1) after Line 46 as Shoban suggested) gave me an output like:
error
error

Then i run the file /home/pi/di_update/Raspbian_For_Robots/pi3/Pi3.sh

And now i have output like this:
280
515
515

I also run the “DI Software Update” but the problem persists.

Hi @basketball4-ever,

It looks like you received a defective ultrasonic sensor. Thanks a lot for testing it out. I’m really sorry for the frustration. We apologize for the delay in getting this sorted for you.

We would like to replace the sensor but since you have made the purchase through www.pi-shop.ch, can you make a request for replacement to them. We would like to work it out through them.

Again, I’m really sorry to hear about this; we’ll make it right immediately, thanks a lot for your patience.

-Shoban

Hi.

read thos topic and after you can use your ultrasonic sensor SRF04:

http://forum.dexterindustries.com/t/grovepi-bug-srf04/2969

you can use also an ultrasonic I2C (SRF02 or SRF08 for example):

http://forum.dexterindustries.com/t/grovepi-with-srf02-or-srf08-ultrasonic-with-protocol-i2c/2970

i use this 3 sensors now.

Have the same problem
Error
Error
Error…
And the ultrasonic ranger is making clicking sounds

Hi, I have got the same problem too. When I run the grove_ultrasonic.py It keeps caught by the TypeError.
Anyone have got the solution. Thanks!

What I am using:

  • Raspberry Pi 3 Model B+
  • GrovePi+

Hi @CRAZZZZZY,

Can you run grovepi.version()? What do you get by running this?

And just so you know, we are preparing to release a new version for the GrovePi’s firmware that only targets bug-fixes. We might give anyone who runs into problems a chance to test the new firmware and see if it works better than the previous.

Thank you!

I have enabled the debug mode, but keeps receiving the following errors:

IOError

IOError

IOError

IOError

IOError

IOError

IOError

IOError

IOError

IOError

Traceback (most recent call last):

File "./grove_ultrasonic.py", line 42, in <module>

print (grovepi.version())

File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 266, in version

return "%s.%s.%s" % (number[1], number[2], number[3])

TypeError: 'int' object has no attribute '__getitem_

Hi @CRAZZZZZY,

I’m pretty sure the GrovePi has no firmware flashed onto it.

Just to be sure about this, type in the command line i2cdetect -y 1 and see if there’s a device at 0x04 address.

Either way, try flashing it and see if it then works.

By the way, you can also use ``` (backticks) to enclose the code so that you can format it properly. Check your response because I have edited yours.

Thank you!

Thanks Robert,

I have ran the i2cdetect -y 1 and got the following result

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – 04 – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Also, I have tried executing firmware_update.sh. However, it encountered the following message:

avrdude: Can’t find programmer id “gpio”

Isn’t that I have missed something? Thanks.

Hi @CRAZZZZZY,

Either you have tried to install the GrovePi manually, or you’re using a very old version of Raspbian For Robots.

I would run the following command if I were you:

curl -kL dexterindustries.com/update_grovepi | bash

Once you do that, try flashing the firmware again.

Let me know how this goes for you.

Thank you!