Building the spy microphone
In this section, we are going to put everything together and actually build our spy microphone.
The hardware for the project is nearly ready if you followed the previous section. You just need to plug the SD card into the reader again.
I also added an LED on pin 7, just to know when the recording is on. If you want to do the same, you just need an LED and a 330 Ohm resistor. Of course, remove this LED when you actually want to use it as a spy microphone or your project might get noticed.
The schematic to help you out is as follows:
The following is the image of the completely assembled project:
We are now going to see the details of the code for the project. Basically, we want the device to record audio from the microphone for a given amount of time and then stop the recording.
As the code is long and complex, we are only going to see the most important parts here.
The first step is to include the SdFat
library:
#include <SdFat.h>
Then, we will create the instances...