elec350

Dependencies:   mbed

Fork of elec350 by Bob Merrison-Hort

microphone.h

Committer:
rmerrisonhort
Date:
2015-10-21
Revision:
10:021f19a9861f
Parent:
9:3801e1da153b
Child:
12:ae626e46b996

File content as of revision 10:021f19a9861f:

#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