Dear all,
Hello, I have few tasks coming up... and I have no experience
with arduino. So this is the only place I could ask.
Here is the thing.
I am trying to make simple frequency detecting system with arduino UNO.
I've done coding & wiring for 'Sound detecting sensor' and it worked.
(When I make any noise, sensor detects it and LED turns on, also used serial.print for monitoring)
What I am trying now is to detect 'frequency' on certain Hz, have LEDs turn on.
For example, I need LED to turn on at 1hz~1500hz and 2500hz~5000hz.
So at 1501hz to 2499hz LED needs to be turned off.
Here is the question.
- Here is my coding for above
int sds = A0; // sds as in sound detecting sensor
int led = 6;
int sensor_value;
void setup() {
Serial.begin(9600);
pinMode(sds,INPUT);
pinMode(led, OUTPUT);
}
void loop(){
sensor_value = analogRead(A0);
Serial.println(sensor_value);
delay(10);
if(sensor_value < 1501){
digitalWrite(led, HIGH);
}
if(sensor_value > 2500){
digitalWrite(led, HIGH);
}
}
I know I have a lot to go.. and if anyone could tell me
what 's wrong with the coding, please by all mean..
I need your guidance.
- Now I am using Arduino UNO and sound sensor that only detects decibel.
I need to buy small frequency sensor for Arduino UNO that has range from 0 to 5000hz.
Over 5000hz is fine, but not below. Can anyone recommend me one?
I know my English isn't that great, but please understand that I am from Korea
and I don't speak that well. It'd be great if you could help me out.
Thank you so much in advance.