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
Diff: microphone.h
- Revision:
- 0:c5d6f214ba01
- Child:
- 1:e14104308237
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/microphone.h Sun Apr 26 06:56:36 2020 +0000
@@ -0,0 +1,23 @@
+#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();
+}