Confusion regarding pins?are these both pairs serving exactly same purpose ?(for interfacing with I2c module)


Please check the attached snap especially the pins that i have placed in red circle.

I want to know wether these pins on left side corner marked A4 and A5, are they doing exactly same thing as the two pins near right corner above Aref pin?

weblink of above snap is:

yes, it simple duplicated in two places.

On a Uno they are indeed the same. If you have a multimeter, you can check it :wink:

The history is that the first Arduinos (e.g. Diecimila) only had the I2C signals on A4/A5. When Arduino started with other boards like the Mega and Leonardo, A4/A5 did not carry the I2C signals so they had to make a plan; either sacrifice A4 and A5 as analogue pins or provide additional pins for the I2C. They did choose the latter with additional pins next to Aref/GND.

A similar problem exists for the SPI pins (11/12/13 on the Uno). But (I think) all boards provide the 6-pin ICSP header that also carries the SPI signals so it's a non-issue if a shield takes that into account. But a shield that relies on SPI being on 11/12/13 will not work (without modification) with a Mega or Leonardo.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.