yajuan yue / Mbed 2 deprecated ele350

Dependencies:   mbed

Fork of ele350 by JIAWEI ZHANG

microphone.h

Committer:
GGHHHH
Date:
2015-11-05
Revision:
3:1ad50b4e51a6

File content as of revision 3:1ad50b4e51a6:

#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