whats wrong in my code???

whats wrong in my code???

I am getting the error…
‘averageReading’ was not declared in this scope.
on line:
Serial.println (AverageReading (sensePin));

// SENSOR READING


int sensePin =0;
int averageReading = 0;

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


 const int numReads = 10;

void loop()
{
   int averageReading = 0;
   for(int i=0; i<numreads; i++)
   {
      averageReading += analogRead(sensePin);
      delay(10000);
   }
   averageReading /= numReads;

  Serial.println (AverageReading (sensePin));

  delay (3000);
  }

int averageReading = 0;

Serial.println (AverageReading (sensePin));

C is case-sensitive. averageReading is not the same as AverageReading.

In addition, averageReading is not a function. Remove the function call…

  Serial.println (averageReading);

Your the man!!! thanks so much!!

openbahr:
Your the man!!! thanks so much!!

I usually try to ignore spelling and punctuation errors in posts, but that made me chuckle. :stuck_out_tongue: