This class implements support for the Grove Voice Recorder. There are two digital pins: one that enables recording, and the other that plays back what was previously recorded.
cout << "Supply any argument to the command line to record." << endl;
cout << "Running this example without arguments will play back any " << endl;
cout << "previously recorded sound." << endl;
cout << "There is approximately 10 seconds of recording time." << endl;
cout << endl;
bool doRecord = false;
if (argc > 1)
doRecord = true;
if (doRecord)
recorder.record(true);
else
recorder.play(true);
cout << "Sleeping for 15 seconds..." << endl;
upm_delay(15);
if (doRecord)
recorder.record(false);
else
recorder.play(false);