Microphone Frequency Detection

hey! so i recently bought myself a microphone shield for the arduino (this one to be exact, https://www.ebay.com/i/171528686960?chn=ps&dispItem=1) and i'm trying to use it to detect frequencies.

so i googled arduino frequency detection code cause i'm a shit programmer and found a pretty nice source from this guy should is using his guitar as a analog input and transcribing those frequencies. here's his main post on the subject and the next link is the code dedicated to the actual guitar.

http://www.instructables.com/id/Reliable-Frequency-Detection-Using-DSP-Techniques/
https://github.com/akellyirl/Arduino-Guitar-Tuner/blob/master/Tuner_aRead.ino

Now I tried copying and pasting the GUITAR code from above into my IDE and replacing the analogRead with a digitalRead because the microphone i'm using I think is inputted as a digital source (? idk how this works but this website said that this kind of microphone needs to be connected digitally https://randomnerdtutorials.com/guide-for-microphone-sound-sensor-with-arduino/), but when I run the code, you guessed it, it doesn't work :frowning:

my main question is why do you think that is? and do you possibly have any solutions for me to use that code for the guitar with my microphone instead?

thanks!

That microphone is setup to output a digital signal when the sound level exceeds a threshold set by the pot on the back of the card. It cares not for frequency. It is absolutely not useful for your project. You will need a microphone that outputs an analog signal of a level that can be used with analogRead (max level depends on Arduino Vcc). Then you can use FFT or FHT to detect the presence of frequencies within certain frequency bands (software solution). Of for a hardware solution tone decoders set to the frequencies that you are interested in.