my library for elec350

Dependencies:   mbed

microphone.h

Committer:
spanesar
Date:
2016-10-19
Revision:
3:d62097c19a4e

File content as of revision 3:d62097c19a4e:

#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.
        signed char read();    
};

#endif