analogread returning too large values

I receiving a values up to 10230 from unconnected pin using analogRead - how it is possible ?
when a pin is cnnected to the ground value is 00 - strange.

It looks like there is extra "zero" at the end of your output.

Yes and this is just when I use analogWrite(A3, x); and on any board uno or nano. strange.

I can't help, if you don't post your code.
My magic power is limited today :slight_smile:

Now I know where is the problem:
If pinMode is declared as an output - if you try to read from it - any analog inputs will have a high value.

void setup()
{

pinMode(A3, OUTPUT);
pinMode(A0, INPUT);
digitalWrite(10,0);
analogWrite(A3, 500);
analogWrite(13,0);
Serial.begin(9600);
analogWrite(A5,0);
}

void loop()
{
if (analogRead(A3)>300)
{
Serial.println(analogRead(A0));
}

Serial.println(analogRead(A0));

}

Have a look at analogWrite function: analogWrite() - Arduino Reference
You abused it twice, given a pin which it doesn't work with, and a value out of scope.

still it is an interesting side effect, (usable for the obfuscated arduino contest :slight_smile: