little confusion in analog stuffs

Thread Starter

bhuvanesh

Joined Aug 10, 2013
268
Rich (BB code):
void setup()
{
  Serial.begin(9600);
 }
void loop()
{
  int a= analogRead(3);
  Serial.println(a);
  delay(1000);
}
but i have not connected anything to that analog pin but i am getting values around 500.whats the reason for that
 

t06afre

Joined May 11, 2009
5,934
Hard to say exactly why it could be say noise pickup. But a thumb rule in electronics is. Undefined input will get you undefined output. So measuring some floating input (not connected) do not give any meaning at all. It is like a radio tuned between to stations
 
Top