Distance Sensor on GoPiGo2

Hello,

I have been trying to use the distance sensor on my GoPiGo2. I have downloaded the DI_sensor library, however, i keep getting errors when i try to run my code. Even when I try to run the example in the DI_sensors library I get an error
IOError: [Errno} Input/Output error.
Even though I have it connected to I2C port and it is enabled on the Pi.

Hi @mamdou7.1,

  1. Can you tell us how you’ve been installing the DI_Sensors library?

  2. Did you run the sudo curl -kL dexterindustries.com/update_sensors | bash command or did you just downloaded the repository on your Raspberry Pi?

  3. Did you plug in the sensor in the I2C port of GoPiGo?

  4. How are you instantiating the distance sensor object?

And can you also get us a screenshot of what the following command’s output?

i2cdetect -y 1

We need more details in order to determine what the issue is.

Thank you!

Edit

This is similar to this thread.