I read this article. In the article, it uses A4 and A5 for I2C. But can I just use SCL and SDA pin directly in the Arduino UNO R3? And do I need a put-up resistor for SCL and SDA pin?
1 Answer
Pins A4/A5 and the SCL/SDA pins are the exact same pins on the Arduino UNO R3. Not just "they perform the same function", but they are physically the same pins. It is one solid piece of metal from one pin to the other.
You don't need pullup resistors on the I2C pins because the Wire
library turns on the internal pullups by default. However those internal pullups are about a tenth of the strength that I2C pullups should be, so I would recommend that you do add pullups, certainly for anything more than a couple of inches of wire.