You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi Jolm,

    You'd probably need at least an amplifier before the ADC - but if you look online you can actually buy Microphone + Amplifier modules for Arduino really cheaply.

    You can capture audio with the Waveform class but only reliably up to about 8kHz. There's also an FFT function which you could run over the Waveform to detect certain frequencies too - I'm not sure if Espruino is fast enough to capture an 8kHz waveform and continuously FFT it as well - you'd have to try.

    But it may be that 8kHz is too low-pitched to pick up the alarm (as that's a max of a 4kHz pitch). The easiest option might be to make some kind of analog 'tuned circuit' that picked up the specific frequency you're after. You could then use a diode to turn that into DC and could measure the amplitude of that with Espruino - obviously it requires a bit more hardware though.

About

Avatar for Gordon @Gordon started