I2C A4/A5

Hello,

Using the Arduino and am running out of ports :slight_smile:

Therefore I would like to use the A4 and A5 pins as "normal" digital PINs.
Can the A4 and A5 (commonly used as I2C) be used as digital pins as well?

Thanks

Therefore I would like to use the A4 and A5 pins as "normal" digital PINs.
Can the A4 and A5 (commonly used as I2C) be used as digital pins as well?

If you don't use I2C at all: yes. If you use I2C the two pins are already used and cannot get another purpose even if you connected the I2C to the SDA/SCL pins of your UNO as on the UNO the SDA/SCL pins are internally connected to A4/A5.

pylon:
If you don't use I2C at all: yes. If you use I2C the two pins are already used and cannot get another purpose even if you connected the I2C to the SDA/SCL pins of your UNO as on the UNO the SDA/SCL pins are internally connected to A4/A5.

OK so my assumption that when NOT using I2C the A4 and A5 can be used as as digitial pins is correct.
Thanks a lot for your time Pylon.

The other analog pins are also digital pins.
If you show a schematic (or a photo of a drawing) then we probably can make more pins available.
It is even possible to use the AREF as input or output pin (not really, but it is possible).
For leds, you can try Charlieplexing.
For buttons or LDR sensors, they can be put in a matrix.
You can add shift registers or add I2C chips with input/output pins.
There are 10 or 20 good ways to add more pins.