
Program to control Electret Microphone Amplifier - MAX9814 from adafruit. Allows: To sample analogue voltage to transform into rough sound level. Transfer sound level to visual indicator, volume bar such as 4 LEDs on LPC11U24.
Dependencies: MAX9814_Electret_Microphone_LED_Volume_Indicator mbed
main.cpp@2:204df97fe23a, 2014-11-02 (annotated)
- Committer:
- andcor02
- Date:
- Sun Nov 02 17:32:24 2014 +0000
- Revision:
- 2:204df97fe23a
- Parent:
- 1:380e6ab41172
Program to control Electret Microphone Amplifier - MAX9814 from adafruit.; ; Allows:; ; To sample analogue voltage to transform into rough sound level.; ; Transfer sound level to visual indicator, volume bar such as 4 LEDs on LPC11U24.; ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andcor02 | 0:d096ca2ffef0 | 1 | #include "mbed.h" |
andcor02 | 2:204df97fe23a | 2 | #include "MAX9814.h" |
andcor02 | 0:d096ca2ffef0 | 3 | Serial pc (USBTX, USBRX); |
andcor02 | 0:d096ca2ffef0 | 4 | |
andcor02 | 0:d096ca2ffef0 | 5 | |
andcor02 | 0:d096ca2ffef0 | 6 | MAX9814 mic(p20); |
andcor02 | 0:d096ca2ffef0 | 7 | |
andcor02 | 0:d096ca2ffef0 | 8 | int main() |
andcor02 | 0:d096ca2ffef0 | 9 | { |
andcor02 | 0:d096ca2ffef0 | 10 | while (1) { |
andcor02 | 0:d096ca2ffef0 | 11 | mic.volume_indicator(); |
andcor02 | 0:d096ca2ffef0 | 12 | pc.printf("\n\r Level is %f", mic.sound_level()); |
andcor02 | 0:d096ca2ffef0 | 13 | } |
andcor02 | 0:d096ca2ffef0 | 14 | } |