AnalogReference (INTERNAL) anxious question

Hellow, i have 4 voltage sensor connected to analog pins 0-3, and a i2c LCD to 4 and 5.
What I want is to set the Aref to 1.1 V for better reading precision of the sensors. My questions is: Can you confirm that i2c use analog as digital pins, so they are not affected by the reference? If yes, I have other things connected to the other digital pins (buttons/switch), they will be also not affected?

Thanks for the patience!

Yes, I2C uses 2 analog pins but are not affected by reference choosing for the other analog inputs.

?

A4 and A5 when used with I2C are, indeed, digital pins and so are unaffected by the analog reference as are all other digital pins.

Railroader:
?

First post with a link to a web page is usually spam.
Reported Gsary..

thanks all! Perfect!

1. By default, all 20 pins of the ATmega328P of UNO are digital IO lines.

2. When Arduino takes over the control, the Port-C pins are analog channels for the internal ADC; this is the reason for the legends A0-A5 on the PCB of the UNO.

3. When you include the following lines in your sketch, the A4 and A5 lines become the SDA and SCL lines of the I2C Bus. A4 and A5 are no longer analog channels; therefore, the command analogReference(INTERNAL) has no relation with I2C Bus.

#include<Wire.h>
Wire.begin();

i2c-2.png

i2c-2.png

GolamMostafa:
[3. When you include the following lines in your sketch, the A4 and A5 lines become the SDA and SCL lines of the I2C Bus. A4 and A5 are no longer analog channels;

That is not true.

analogRead(A4); still reads the voltage analog and it would use the configured reference.

There is more incorrect or misleading info in the @GolamMostafa post, but that's not a surprise to me.