This hello world utilizes the basic functions setup in the MAX4466 library to indicate volume levels read from the microphone using the 4 LEDs built in to the MBED
Revision 0:fc5acbf5061c, committed 2015-10-23
- Comitter:
- mgolino
- Date:
- Fri Oct 23 18:37:46 2015 +0000
- Child:
- 1:c5772cef09bc
- Commit message:
- MAX4466 Hello World
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MAX4466.lib Fri Oct 23 18:37:46 2015 +0000 @@ -0,0 +1,1 @@ +MAX4466#712373b300a2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Oct 23 18:37:46 2015 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+#include "MAX4466.h"
+Serial pc (USBTX, USBRX);
+
+
+MAX4466 mic(p20);
+
+int main()
+{
+ while (1) {
+ mic.volume_indicator();
+ pc.printf("\n\r Level is %f", mic.sound_level());
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 23 18:37:46 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file
Electret Microphone - MAX4466 Amplifier