Problem with sensor e.g. sound sensor

I have a sound sensor and wanted to use it with Arduino.
Conencted VCC GND and data pin to A6

Here is the simple code I wrote

int Sound ;

void setup() {

   pinMode(A6, INPUT);


   Serial.begin(9600);
}

void loop() {
  Sound=ananlogRead(A6);
  Serial.println(Sound);
  delay(100);
}

I can't see why this would not work. In the code I am using analogRead, but I also tried digital read.
With Analog read I see in the serial monitor the constant value of 1023 and no sounds make any difference in Serial monitor. When I snap my fingers I can see the onboard LED flicker so it is a clear reaction to sound.
If I turn the onboard potentiometer to the right at one stage there is an LED is lit constantly and the read value changes to 32 and again no sound changes anything.

With digital read I am always getting the value 0 no matter what happens.

Just to doble check the concept and rule out that the sensor has a problem I used the schock sensor that I have instead and I couldnt make it wok either. I changed and used different pins. Arduino itself is ok as I used it for different project and it was working fine

Please advice

That is what I would expect, the sound boards I use it is a digital not an analog output. The pot controls the threshold. If yours is different include the make and model along with a schematic if you can get one.

The code you posted will not compile (no such function ananlogRead()). It is useless to post code that is not the exact code you ran on your board.

Which exact Arduino board do you use? Not all have an A6 input.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.