Nano A4 and A5

Hi

I wonder why the arduino Nano pins A4 and A5 can not be used to read analog signals properly, Im using a simple LM35 sensor, it works good on all analog imputs except on the A4 and A5, I know they are SDA and SCL dedicated pins, but even disabling all internal pullups they do not get good measurements.

sigifred:
Hi

I wonder why the arduino Nano pins A4 and A5 can not be used to read analog signals properly, Im using a simple LM35 sensor, it works good on all analog imputs except on the A4 and A5, I know they are SDA and SCL dedicated pins, but even disabling all internal pullups they do not get good measurements.

You must have some mistake or incompatibility in the code or the wiring, both of which you chose to keep secret.

Nobody can tell you what you did wrong with a project that you won't show to them. Common sense should tell you that. A4 and A5 work just fine as analog inputs. You did something wrong.

Or you damaged those two pins in the past. Try another Nano.

Maybe you mean A6 and A7? Those are analogREAD only due to how the chip muxes the 2 pins through ADC.

sigifred:
Hi

I wonder why the arduino Nano pins A4 and A5 can not be used to read analog signals properly, Im using a simple LM35 sensor, it works good on all analog imputs except on the A4 and A5, I know they are SDA and SCL dedicated pins, but even disabling all internal pullups they do not get good measurements.

A4 and A5 are not dedicated pins for the SDA and SCL signals for the I2C (aka TWI) Bus. By default, these two pins are dedicated pins as the pc4 and pc5 IO lines for Port-C. These two lines are converted to their following possible alternate functions –

1. SDA and SCL lines when we activate the TWIEN-bit of the TWICR Register. In the Arduino UNO Platform, we execute the following codes:

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

2. ADC4 and ADC5 lines when we activate the ADEN-bit of the ADCSRA Register and select the appropriate channel via ADMUX Register. In the Arduino UNO Platform, we execute the following code:

int x = analogRead(A4);