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

Dependencies:   MAX4466 mbed

Committer:
mgolino
Date:
Fri Oct 23 18:37:46 2015 +0000
Revision:
0:fc5acbf5061c
MAX4466 Hello World

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mgolino 0:fc5acbf5061c 1 #include "mbed.h"
mgolino 0:fc5acbf5061c 2 #include "MAX4466.h"
mgolino 0:fc5acbf5061c 3 Serial pc (USBTX, USBRX);
mgolino 0:fc5acbf5061c 4
mgolino 0:fc5acbf5061c 5
mgolino 0:fc5acbf5061c 6 MAX4466 mic(p20);
mgolino 0:fc5acbf5061c 7
mgolino 0:fc5acbf5061c 8 int main()
mgolino 0:fc5acbf5061c 9 {
mgolino 0:fc5acbf5061c 10 while (1) {
mgolino 0:fc5acbf5061c 11 mic.volume_indicator();
mgolino 0:fc5acbf5061c 12 pc.printf("\n\r Level is %f", mic.sound_level());
mgolino 0:fc5acbf5061c 13 }
mgolino 0:fc5acbf5061c 14 }