elec350

Dependencies:   mbed

Fork of elec350 by Bob Merrison-Hort

microphone.h

Committer:
rmerrisonhort
Date:
2015-11-19
Revision:
16:721e41936a07
Parent:
12:ae626e46b996

File content as of revision 16:721e41936a07:

#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