Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos 4180Final SDFileSystem
microphone.h
- Committer:
- William12
- Date:
- 2020-04-26
- Revision:
- 0:c5d6f214ba01
- Child:
- 1:e14104308237
File content as of revision 0:c5d6f214ba01:
#include "mbed.h"
class microphone
{
public :
microphone(PinName pin);
float read();
operator float ();
private :
AnalogIn _pin;
};
microphone::microphone (PinName pin):
_pin(pin)
{
}
float microphone::read()
{
return _pin.read();
}
inline microphone::operator float ()
{
return _pin.read();
}