user45654: After watching something weird on the serial monitor I wrote a simple code to monitor the analog pin input values. There was nothing connected to the analog pins still they where showing decimal representation of some analog values.
the code is
float ana [] = {A0,A1,A2,A3,A4,A5};
float dec [6];  

void setup() 
{
Serial.begin(9600);
}

void loop() 
{ 
  for(int i = 0; i<6 ; i++)
  {
    dec[i] = analogRead(ana[i]);
    Serial.println(dec[i]);
    delay(1000);
  }
}

How is this even possible?
this is the output result


user33871: Your input is floating if nothing is connected.  It is reading whatever random noise it happens to pick up.  That's what it is supposed to do.  For it to read 0 it would need to be connected to ground.  Google "floating input" for more info.  

45654: <p>After watching something weird on the serial monitor I wrote a simple code to monitor the analog pin input values. There was nothing connected to the analog pins still they where showing decimal representation of some analog values.</p>

<p>the code is</p>

<pre><code>float ana [] = {A0,A1,A2,A3,A4,A5};
float dec [6];  

void setup() 
{
Serial.begin(9600);
}

void loop() 
{ 
  for(int i = 0; i&lt;6 ; i++)
  {
    dec[i] = analogRead(ana[i]);
    Serial.println(dec[i]);
    delay(1000);
  }
}
</code></pre>

<p>How is this even possible?</p>

<p>this is the output result</p>

<p><a href="https://i.stack.imgur.com/43MHx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/43MHx.png" alt="enter image description here"></a></p>
 33871: <p>Your input is floating if nothing is connected.  It is reading whatever random noise it happens to pick up.  That's what it is supposed to do.  For it to read 0 it would need to be connected to ground.  Google "floating input" for more info.  </p>
