Demo program frequency

I had created a program that used soundpressurelevel to capture n readings and give me an average and use that average to trigger action when a smoke alarm went off. Problem with that was that a lawnmower or hammer could do the same thing.

Looking in extention I found * Get frequency tone microphone Extension by Juan Antonio it was a little scary because the link takes you to a page in Spanish, but Google to the rescue.

The sample code by the author is Spanish but with a little translation I got a minimal app running, it works a treat. I used an online tone generator Online Tone Generator - generate pure tones of any frequency (szynalski.com) to validate that the program actually reports the correct values, it has a bit of an issue with low tones but otherwise the extension works great.

Muchos gracias to the author of the extension.

3 Likes