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
Diff: main.cpp
- Revision:
- 0:fc5acbf5061c
diff -r 000000000000 -r fc5acbf5061c main.cpp
--- /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
Electret Microphone - MAX4466 Amplifier