Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ele350 by
Diff: microphone.h
- Revision:
- 3:1ad50b4e51a6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/microphone.h Thu Nov 05 12:01:26 2015 +0000 @@ -0,0 +1,25 @@ +#ifndef _MICROPHONE_H_ +#define _MICROPHONE_H_ + +#include "mbed.h" + +class Microphone +{ + private: + bool isStarted; + public: + // Constructor. + Microphone(); + + // Begins sampling data from the microphone using timer 3. + void start(); + + // Ends sampling (UNTESTED!) + void stop(); + + // Returns a signed 8-bit integer containing the latest data from the microphone. + int8_t read(); +}; + +#endif +