1

I need to use the ID_SD and ID_SC pins for a ultrasonic sensor. Is this possible?

I am already using SDA and SCL for i2c communication so disabling the i2c bus in raspi-config is not an option.

This stackexchange post sheds some light on it but seems to suggest it might be possible. Does anyone have any input on this? Thank you.

1 Answer 1

1

As far as I am aware you will be fine provided

  1. You are not using a HAT which is configured via ID_SD and ID_SC.
  2. You are not using a Pi3 or if you are using a Pi3 you will not be using the ID_SD or ID_SC GPIO in I2C mode.

The Pi3 uses I2C bus 0 for internal purposes. Setting the ID_SD and ID_SC GPIO as I2C will confuse I2C bus 0.

12
  • Pins 27/28 are configured as Input after boot. I have seen instructions for setting them as I²C (but have not tested this). They are certainly NOT configured as I²C in normal use, so I see no evidence they cannot be used as normal.
    – Milliways
    Sep 12, 2016 at 11:48
  • @joan I am using it with a Pi 3. Looks like I'm out of luck.
    – Shoumik
    Sep 12, 2016 at 12:01
  • @Milliways I think they're set as i2c if the i2c bus is enabled in raspi-config.
    – Shoumik
    Sep 12, 2016 at 12:03
  • @joan Is it possible to switch my SDA and SCL to ID_SD and ID_SC respectively and use them as my i2c connections? Or is i2c bus 0 for Pi3 absolutely out of the question?
    – Shoumik
    Sep 12, 2016 at 12:44
  • @kimuohs Not on a Pi3. Using I2C bus 0 is a no no. However perhaps Milliways is correct, in which case just try using 27/28 as normal GPIO and see if the sonar ranger works.
    – joan
    Sep 12, 2016 at 13:20

Your Answer

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

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