I am having problem regarding how to adjust sound sensitivity of a sound sensor module that is probably KY-0037/38. When I turn the potentiometer on the sound sensor module, it just go infinity without any limitations..
Speaking frankly, I don't know how to do this, please provide the code to run the sensor...
I have seen the sensor only 15 days before please help me with this sensor...
I don't know how to do, what to do, when to do, where to do!!!!!
I am going to blow off my brain
My code is
// By tarshgautam2010@gmail.com
//
int Sensor = A0; int clap = 0; long detection_range_start = 0; long detection_range = 0; boolean status_lights = false;
void setup() {
pinMode(Sensor, INPUT);
pinMode(10,OUTPUT);
}
void loop() {
int status_sensor = digitalRead(Sensor);
if (status_sensor == 0) {
if (clap == 0) {
detection_range_start = detection_range = millis(); clap++;
} else if (clap > 0 && millis()-detection_range >= 50) {
detection_range = millis(); clap++;
} }
if (millis()-detection_range_start >= 400) {
if (clap == 2) {
if (!status_lights) {
status_lights = true; digitalWrite(10, HIGH); }
else if (status_lights) {
status_lights = false;
digitalWrite(10, LOW); } }
clap = 0;
}
}
This is a good that have used but there is a problem that I have to shout very loud or make very loud noises to activate the LED or to deactivate LED. What should I do about it it's a problem I have tried to aches the sensitivity with with the potential metre of the sensor but it doesn't work I have check this with three senses.
The the result is always same with the thing. Thank you very much...
Please leave a like because I have not received even a single like after creating my account before 2 years. I like everybody's comments on my topics