I2C was working great for over a month using an Adafruit Motor Hat, and an LSM303 accelerator/compass also on the interface passing through the Motor Hat and consuming 3v. As a side note, power-wise, two HC-SR04 sensors attached to GPIOs and 5v.

sudo i2cdetect -y 1 will show the devices, I'll run my robot control software and although the devices init, as soon as I send a command to the wheels my app will crash because the devices have disappeared and sudo i2cdetect -y 1 will not show the devices. That's happened a couple of times. The devices would eventually come back with no known action causing them to return despite my best efforts at process of elimination. Now I can't get them to come back.

There have been no updates to the OS.

As I make changes to diagnose, suggestions on where I should focus?

  • Wiring/Soldering
  • Power
  • Failed Motor Hat
  • Failed Pi

Steps taken without consistently providing a fix:

  • A reboot worked once to restore the connections but never again.
  • Enabled/disabled the I2C interface.
  • Resoldered SCL/SDA.
  • Tried disconnecting the LSM303
  • Turned the battery supplying the motors off/on
  • Disconnected the HC-SR04 sensors

I have another Pi but haven't tried swapping it in yet - I guess that is my next step even though that seems unlikely to fix it.

Thanks in advance.

  • what is your question?
    – jsotola
    Feb 3, 2019 at 20:46
  • Mid-way through the post, see the question has a question mark at the end: As I make changes to diagnose, suggestions on where I should focus?
    – Rob Reuss
    Feb 3, 2019 at 21:33
  • Since you've attended to every other hardware possibility, except a different pi ... I'd say it is likely that the unlikely is not as unlikely as you think Feb 3, 2019 at 22:29

1 Answer 1


Perhaps you have damaged the GPIO by feeding 5V from the sonar rangers back to the GPIO?

Try wiringPi's pintest utility or (my) pigpio's gpiotest to check the GPIO.

  • It's possible I did because I was originally feeding 5V - subsequently I divided the voltage but perhaps it was too late. It turned out the Pi was the problem - swapped in another and it works fine. :( Thanks.
    – Rob Reuss
    Feb 3, 2019 at 22:39
  • Accepting your answer because it was the likely cause.
    – Rob Reuss
    Feb 3, 2019 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.