yajuan yue / Mbed 2 deprecated ele350

Dependencies:   mbed

Fork of ele350 by JIAWEI ZHANG

Revision:
3:1ad50b4e51a6
diff -r 9a0770c4fdd6 -r 1ad50b4e51a6 microphone.h
--- /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
+