satbir panesar / Mbed 2 deprecated elec350

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers microphone.h Source File

microphone.h

00001 #ifndef _MICROPHONE_H_
00002 #define _MICROPHONE_H_
00003 
00004 #include "mbed.h"
00005 
00006 class Microphone
00007 {
00008     private:
00009         bool isStarted;
00010     public:
00011         // Constructor.
00012         Microphone();
00013         
00014         // Begins sampling data from the microphone using timer 3.
00015         void start();
00016         
00017         // Ends sampling (UNTESTED!)
00018         void stop();
00019         
00020         // Returns a signed 8-bit integer containing the latest data from the microphone.
00021         signed char read();    
00022 };
00023 
00024 #endif