0

On Arduino Due, there is two pairs of pins SDA/SCL that I can use for I2C. There is SDA0 and SCL0 at, respectively, pins 20 and 21 and an another near AREF. How do I choose which one of them I use ? I also read that 20 and 21 has built-in pull-up resistor, is that true ?

  • The easiest/quickest way would be to experiment. Attach an I2C device and use I2CScanner to detect it, then repeat with the other pins. As to the pull-up you could use a volt metre to test that (I think) – Code Gorilla May 19 '17 at 7:37
2

Pins 20 and 21 are the default I2C pins. A lot of libraries assume you use these, and would require some extra work to get working with SDA1/SCL1.

They also have their pullup resistors already present on the board of the Due (see schematic).

So just use pins 20 and 21, unless you have a good reason to use the other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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