elec350

Dependencies:   mbed

Fork of elec350 by Bob Merrison-Hort

microphone.h

Committer:
rmerrisonhort
Date:
2015-10-21
Revision:
12:ae626e46b996
Parent:
10:021f19a9861f

File content as of revision 12:ae626e46b996:

#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